pub struct EventMetadata {
pub ts: u64,
pub tid: i64,
}
Fields§
§ts: u64
§tid: i64
Implementations§
Source§impl EventMetadata
impl EventMetadata
pub fn timestamp(&self) -> Option<SystemTime>
Sourcepub fn write_header<W: Write>(
&self,
len: u32,
event_type: u16,
nparams: u32,
writer: W,
) -> Result<()>
pub fn write_header<W: Write>( &self, len: u32, event_type: u16, nparams: u32, writer: W, ) -> Result<()>
Write event header
To form a valid event, after calling this method, the caller must write out the payload
at exactly len - 26
bytes, containing nparam
lengths (as the proper type)
and the parameter values themselves.
Sourcepub fn write_header_with_lengths<W: Write, L: Into<u32> + Copy, const N: usize>(
&self,
event_type: u16,
lengths: [L; N],
writer: W,
) -> Result<()>
pub fn write_header_with_lengths<W: Write, L: Into<u32> + Copy, const N: usize>( &self, event_type: u16, lengths: [L; N], writer: W, ) -> Result<()>
Write event header and parameter lengths
To form a valid event, after calling this method, the caller must write out the payload
for each parameter, lengths[i]
bytes in length.
Trait Implementations§
Source§impl Clone for EventMetadata
impl Clone for EventMetadata
Source§fn clone(&self) -> EventMetadata
fn clone(&self) -> EventMetadata
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for EventMetadata
impl Debug for EventMetadata
Auto Trait Implementations§
impl Freeze for EventMetadata
impl RefUnwindSafe for EventMetadata
impl Send for EventMetadata
impl Sync for EventMetadata
impl Unpin for EventMetadata
impl UnwindSafe for EventMetadata
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more