Skip to main content

Codec

Trait Codec 

Source
pub trait Codec: Token {
    type Context: Context;
    type Close<'d>: Close<'d, Context = Self::Context>;
    type Tuning: Tuning<Slot = <Self::Context as Context>::Slot>;
    type Frame: Decode<Context = Self::Context, Tuning = Self::Tuning>;

Show 13 methods // Required methods fn close(control: Self::Close<'_>) -> Self; fn flight(key: <Self::Context as Context>::Key) -> Self; fn prepare() -> Self; fn probe(probe: <Self::Context as Context>::Probe) -> Self; fn cancel_probe(probe: <Self::Context as Context>::Probe) -> Self; fn shutdown() -> Self; fn tuning(control: Self::Tuning) -> Self; fn cancel_key(key: <Self::Context as Context>::Key) -> Self; fn cancel_tune(control: Self::Tuning) -> Self; fn cancel( cancel: Cancel<<Self::Context as Context>::Key, Self::Tuning>, ) -> Self; fn bind<D>( self, drain: &D, ) -> Bound<<D as Drain>::Echo, <D as Drain>::Class, <Self as Codec>::Frame, <D as Drain>::Flight, <<Self as Codec>::Context as Context>::Key, <Self as Codec>::Tuning> where D: Drain<Key = <Self::Context as Context>::Key, Returned = <Self::Context as Context>::Returned>; fn closed(self) -> Option<<Self::Context as Context>::Returned>; fn decode( self, ) -> Decoded<<<Self as Codec>::Context as Context>::Key, <<Self as Codec>::Context as Context>::Returned, <Self as Codec>::Frame, <Self as Codec>::Tuning>;
}
Expand description

Native identity construction and classification, before host ownership binding.

Required Associated Types§

Source

type Context: Context

Source

type Close<'d>: Close<'d, Context = Self::Context>

Source

type Tuning: Tuning<Slot = <Self::Context as Context>::Slot>

Source

type Frame: Decode<Context = Self::Context, Tuning = Self::Tuning>

Required Methods§

Source

fn close(control: Self::Close<'_>) -> Self

Source

fn flight(key: <Self::Context as Context>::Key) -> Self

Source

fn prepare() -> Self

Source

fn probe(probe: <Self::Context as Context>::Probe) -> Self

Source

fn cancel_probe(probe: <Self::Context as Context>::Probe) -> Self

Source

fn shutdown() -> Self

Source

fn tuning(control: Self::Tuning) -> Self

Source

fn cancel_key(key: <Self::Context as Context>::Key) -> Self

Source

fn cancel_tune(control: Self::Tuning) -> Self

Source

fn cancel(cancel: Cancel<<Self::Context as Context>::Key, Self::Tuning>) -> Self

Source

fn bind<D>( self, drain: &D, ) -> Bound<<D as Drain>::Echo, <D as Drain>::Class, <Self as Codec>::Frame, <D as Drain>::Flight, <<Self as Codec>::Context as Context>::Key, <Self as Codec>::Tuning>
where D: Drain<Key = <Self::Context as Context>::Key, Returned = <Self::Context as Context>::Returned>,

Source

fn closed(self) -> Option<<Self::Context as Context>::Returned>

Source

fn decode( self, ) -> Decoded<<<Self as Codec>::Context as Context>::Key, <<Self as Codec>::Context as Context>::Returned, <Self as Codec>::Frame, <Self as Codec>::Tuning>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§