Skip to main content

RawEvent

Struct RawEvent 

Source
#[non_exhaustive]
pub struct RawEvent<'a, 'f> { pub type_id: WireTypeId, pub name: &'f str, pub timestamp_ns: Option<u64>, pub fields: &'f [FieldValueRef<'a>], pub schema: &'f SchemaEntry, pub string_pool: &'f StringPool, pub stack_pool: &'f StackPool, }
Expand description

A decoded event passed to Decoder::for_each_event.

'a is the lifetime of the input data buffer (strings, stack frames borrow from it). 'f is the lifetime of the fields slice and schema name (reused across calls).

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§type_id: WireTypeId§name: &'f str§timestamp_ns: Option<u64>§fields: &'f [FieldValueRef<'a>]§schema: &'f SchemaEntry§string_pool: &'f StringPool§stack_pool: &'f StackPool

Implementations§

Source§

impl<'a, 'f> RawEvent<'a, 'f>

Source

pub fn field_names(&self) -> impl Iterator<Item = &'f str>

Field names from the schema, parallel to fields.

Auto Trait Implementations§

§

impl<'a, 'f> Freeze for RawEvent<'a, 'f>

§

impl<'a, 'f> RefUnwindSafe for RawEvent<'a, 'f>

§

impl<'a, 'f> Send for RawEvent<'a, 'f>

§

impl<'a, 'f> Sync for RawEvent<'a, 'f>

§

impl<'a, 'f> Unpin for RawEvent<'a, 'f>

§

impl<'a, 'f> UnsafeUnpin for RawEvent<'a, 'f>

§

impl<'a, 'f> UnwindSafe for RawEvent<'a, 'f>

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.