Skip to main content

EventRecord

Struct EventRecord 

Source
#[repr(C)]
pub struct EventRecord { pub kind: u32, pub reason: u32, pub media_27mhz: u64, pub a_us: u64, pub b_us: u64, pub track: u32, pub track_valid: u32, }
Expand description

Plain-data, #[repr(C)] form of an Event for a C ABI.

kindreasonmedia_27mhza_usb_us
1 StartPlaying0start positionlead0
2 PauseReason::codehold positiondepthresume target
3 Resume0restart positionlead0
4 TargetChanged00old targetnew target
5 OverMax00needmax
6 Rebaselined0000
7 EventsDropped00count0

track_valid is 1 only for a Pause that names the starving track in track (two or more tracks known); otherwise both are 0. Layout (ABI version 2): 40 bytes, kind@0 reason@4 media_27mhz@8 a_us@16 b_us@24 track@32 track_valid@36.

There is no separate “Starved” event: a starvation is a Pause whose reason is 2/3 and whose a_us is the lead at that instant.

Fields§

§kind: u32

Event kind code (see kind).

§reason: u32

Pause reason code, else 0.

§media_27mhz: u64

Media position (PTS domain, 27 MHz), else 0.

§a_us: u64

First value (table above).

§b_us: u64

Second value (table above).

§track: u32

The starving track when track_valid == 1, else 0.

§track_valid: u32

1 when track is meaningful, else 0.

Trait Implementations§

Source§

impl Clone for EventRecord

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for EventRecord

Source§

impl Debug for EventRecord

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for EventRecord

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for EventRecord

Source§

impl PartialEq for EventRecord

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for EventRecord

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for EventRecord

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.