Trait SerialBackend

Source
pub trait SerialBackend: Send {
    // Required methods
    fn into_resource(self: Box<Self>) -> Resource<SerialBackendHandle>;
    fn as_io(&self) -> &dyn SerialIo;
    fn as_io_mut(&mut self) -> &mut dyn SerialIo;
    fn into_io(self: Box<Self>) -> Box<dyn SerialIo>;
}
Expand description

Trait implemented by types that resolve from [SerialBackendHandle]. Provides a SerialIo implementation but also provides for converting the type back to a resource.

Required Methods§

Source

fn into_resource(self: Box<Self>) -> Resource<SerialBackendHandle>

Reclaims the resource.

Source

fn as_io(&self) -> &dyn SerialIo

Gets the inner IO trait.

Source

fn as_io_mut(&mut self) -> &mut dyn SerialIo

Gets the inner IO trait mutably.

Source

fn into_io(self: Box<Self>) -> Box<dyn SerialIo>

Gets the inner IO trait object.

Implementors§

Source§

impl<T: 'static + SerialIo + Into<Resource<SerialBackendHandle>>> SerialBackend for T