Trait blackbox_log::frame::Frame

source ·
pub trait Frame: Sealed {
    type Value: Into<Value>;

    // Required methods
    fn len(&self) -> usize;
    fn get_raw(&self, index: usize) -> Option<u32>;
    fn get(&self, index: usize) -> Option<Self::Value>;

    // Provided methods
    fn is_empty(&self) -> bool { ... }
    fn iter_raw(&self) -> RawFieldIter<'_, Self> 
       where Self: Sized { ... }
    fn iter(&self) -> FieldIter<'_, Self> 
       where Self: Sized { ... }
}
Expand description

A parsed data frame.

Note: All methods exclude any required metadata fields. Those can be accessed by the inherent methods on each frame struct.

Required Associated Types§

Required Methods§

source

fn len(&self) -> usize

Returns the number of fields in the frame.

source

fn get_raw(&self, index: usize) -> Option<u32>

Returns the raw bits of the parsed value of a field by its index.

This ignores the signedness of the field. That can be retrieved from the field definition returned by FrameDef::get.

Note: Unlike the --raw flag for blackbox_decode, this does apply predictors. This method only skips converting the value into its proper units.

source

fn get(&self, index: usize) -> Option<Self::Value>

Gets the value of a field by its index.

Provided Methods§

source

fn is_empty(&self) -> bool

Returns true if the frame is empty, or none of its fields satisfy the configured filter.

source

fn iter_raw(&self) -> RawFieldIter<'_, Self>
where Self: Sized,

source

fn iter(&self) -> FieldIter<'_, Self>
where Self: Sized,

Iterates over all field values in order.

Implementors§

source§

impl Frame for GpsFrame<'_, '_, '_>

source§

impl Frame for MainFrame<'_, '_, '_>

source§

impl Frame for SlowFrame<'_, '_, '_>