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§
Sourcefn into_resource(self: Box<Self>) -> Resource<SerialBackendHandle>
fn into_resource(self: Box<Self>) -> Resource<SerialBackendHandle>
Reclaims the resource.