Trait DataFrame

Source
pub trait DataFrame: Sized + Decode {
    type ProtocolVersion: ProtocolVersion;

    // Required methods
    fn is_meta(&self) -> bool;
    fn target(&self) -> SensorId;

    // Provided method
    fn into_versioned(self) -> VersionedDataFrame<Self::ProtocolVersion, Self> { ... }
}
Expand description

Marker type for data frames.

Required Associated Types§

Source

type ProtocolVersion: ProtocolVersion

The protocol version used by this data frame.

Required Methods§

Source

fn is_meta(&self) -> bool

Indicates whether the data resembles metadata.

Source

fn target(&self) -> SensorId

Gets the target Sensor ID for this frame. This takes care of handling metadata frames correctly, as they embed their target IDs.

Provided Methods§

Source

fn into_versioned(self) -> VersionedDataFrame<Self::ProtocolVersion, Self>

Wraps this data frame into a VersionedDataFrame using the specified ProtocolVersion.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§