pub(crate) fn read(
        raw: &mut &'a [u8],
        running_status: &mut Option<u8>,
    ) -> Result<TrackEvent<'a>> {
        let delta = u28::read_u7(raw).context(err_invalid!("failed to read event deltatime"))?;
        let kind = TrackEventKind::read(raw, running_status)
            .context(err_invalid!("failed to parse event"))?;
        Ok(TrackEvent { delta, kind })
    }
/// Advances the slice and updates `running_status`.
///
/// In case of failure the slice might be left in the middle of an event!
Advances the slice and updates `running_status`.
In case of failure the slice might be left in the middle of an event!
Advances the slice and updates ` running_status ` . In case of failure the slice might be left in the middle of an event!
pub(crate) fn read(
        raw: &mut &'a [u8],
        running_status: &mut Option<u8>,
    ) -> Result<TrackEvent<'a>> {
        let delta = u28::read_u7(raw).context(err_invalid!("failed to read event deltatime"))?;
        let kind = TrackEventKind::read(raw, running_status)
            .context(err_invalid!("failed to parse event"))?;
        Ok(TrackEvent { delta, kind })
    }
pub ( crate ) fn read ( raw : & mut & ' a [ u8 ] , running_status : & mut Option < u8 > , ) -> Result < TrackEvent < ' a > > { let delta = u28 :: read_u7 ( raw ) . context ( err_invalid ! ( " " ) ) ? ; let kind = TrackEventKind :: read ( raw , running_status ) . context ( err_invalid ! ( " " ) ) ? ; Ok ( TrackEvent { delta , kind } ) }
Advances the slice and updates `running_status`.
Advances the slice and updates ` running_status ` .
raw
&mut &'a [u8]
running_status
&mut Option<u8>
raw
&mut &'a [u8]
running_status
&mut Option<u8>