Skip to main content

NetworkFor

Trait NetworkFor 

Source
pub trait NetworkFor<T: ?Sized>: Sealed<T> {
    // Required methods
    fn serialize_thunk(is_demux: bool) -> Expr;
    fn deserialize_thunk(tagged: Option<&Type>) -> Expr;
    fn name(&self) -> Option<&str>;
}
Expand description

A networking backend implementation that supports items of type T.

Required Methods§

Source

fn serialize_thunk(is_demux: bool) -> Expr

Generates serialization logic for sending T.

Source

fn deserialize_thunk(tagged: Option<&Type>) -> Expr

Generates deserialization logic for receiving T.

Source

fn name(&self) -> Option<&str>

Returns the optional name of the network channel.

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§

Source§

impl<Tr, S, T: ?Sized> NetworkFor<T> for NetworkingConfig<Tr, S>
where Tr: TransportKind + ?Sized, S: SerKind<T> + ?Sized,

Source§

impl<Tr, S, T: ?Sized> NetworkFor<T> for NetworkingConfig<Tr, S, String>
where Tr: TransportKind + ?Sized, S: SerKind<T> + ?Sized,