pub struct Record {
pub event_type: EventType,
pub time_stamp: u32,
pub event_data: [u32; 3],
}Expand description
Fields§
§event_type: EventType§time_stamp: u32§event_data: [u32; 3]Implementations§
Source§impl Record
impl Record
Sourcepub const fn encode(&self) -> [u32; 4]
pub const fn encode(&self) -> [u32; 4]
Encodes the record into a [u32; 4] array.
The encoding is endian-agnostic in the sense that the u32 words contain the
architectural values. When writing these to bytes, care must be taken to maintain
consistency.
§Returns
A [u32; 4] buffer containing the encoded record.
Sourcepub fn payload(&self) -> Option<EventPayload>
pub fn payload(&self) -> Option<EventPayload>
Parses the event data into a strongly-typed EventPayload.
§Returns
Some(EventPayload)if the event data can be parsed for the record’sevent_type.Noneif parsing fails.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Record
impl Freeze for Record
impl Move for Record
impl RefUnwindSafe for Record
impl Send for Record
impl Sync for Record
impl Unpin for Record
impl UnsafeUnpin for Record
impl UnwindSafe for Record
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)