Trait message_io::network::adapter::Resource[][src]

pub trait Resource: Send + Sync {
    fn source(&mut self) -> &mut dyn Source;
}

A Resource is defined as an object that can return a mutable reference to a Source. Source is the trait that mio uses to register in the poll in order to wake up asynchronously from events. Your Remote and Local entities must implement Resource.

Required methods

fn source(&mut self) -> &mut dyn Source[src]

This is the only method required to make your element a resource. Note: Any mio network element implements Source, you probably wants to use one of them as a base for your non-blocking transport. See Source.

Loading content...

Implementors

Loading content...