ToTransport

Trait ToTransport 

Source
pub trait ToTransport {
    type Output;
    type Context<'a>;

    // Required method
    fn to_transport(
        &self,
        context: Self::Context<'_>,
    ) -> Result<Self::Output, CodecError>;
}
Expand description

Converts an application-level type to a transport-level type, ready for encoding.

Required Associated Types§

Required Methods§

Source

fn to_transport( &self, context: Self::Context<'_>, ) -> Result<Self::Output, CodecError>

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.

Implementations on Foreign Types§

Source§

impl ToTransport for LogMsg

Source§

type Output = Msg

Source§

type Context<'a> = Compression

Source§

fn to_transport( &self, compression: Self::Context<'_>, ) -> Result<Self::Output, CodecError>

Source§

impl ToTransport for ArrowMsg

Source§

type Output = ArrowMsg

Source§

type Context<'a> = (StoreId, Compression)

Source§

fn to_transport( &self, (store_id, compression): Self::Context<'_>, ) -> Result<Self::Output, CodecError>

Implementors§