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§
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>
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>
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>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".