Skip to main content

SendableFrameMeta

Trait SendableFrameMeta 

Source
pub trait SendableFrameMeta<CC, BC> {
    // Required method
    fn send_meta<S>(
        self,
        core_ctx: &mut CC,
        bindings_ctx: &mut BC,
        frame: S,
    ) -> Result<(), SendFrameError<S>>
       where S: NetworkSerializer,
             S::Buffer: BufferMut;
}
Expand description

A trait providing the send implementation for some frame identified by a metadata type.

This trait sidesteps orphan rules by allowing SendFrameContext to be implemented by the multiple core crates, given it can always be implemented for a local metadata type. SendableFrameMeta should always be used for trait implementations, while SendFrameContext is used for trait bounds.

Required Methods§

Source

fn send_meta<S>( self, core_ctx: &mut CC, bindings_ctx: &mut BC, frame: S, ) -> Result<(), SendFrameError<S>>

Sends this frame metadata to the provided contexts.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<BC, S, Meta, DeviceId> SendableFrameMeta<FakeCoreCtx<S, Meta, DeviceId>, BC> for Meta

Source§

impl<Meta, BC> SendableFrameMeta<FakeFrameCtx<Meta>, BC> for Meta