pub enum Resource {
Port(Port),
Os(OsResource),
}
Expand description
A resource that can be sent via a port.
Variants§
Port(Port)
Another port.
Os(OsResource)
An OS resource (file descriptor, Windows handle, or socket).
Trait Implementations§
source§impl MessageDecode<'_, Message, Resource> for MessageEncoder
impl MessageDecode<'_, Message, Resource> for MessageEncoder
source§fn read_message(
item: &mut InplaceOption<'_, Message>,
reader: MessageReader<'_, '_, Resource>,
) -> Result<()>
fn read_message( item: &mut InplaceOption<'_, Message>, reader: MessageReader<'_, '_, Resource>, ) -> Result<()>
Reads a message into
item
.source§impl MessageEncode<Box<dyn DynSerializeMessage>, Resource> for MessageEncoder
impl MessageEncode<Box<dyn DynSerializeMessage>, Resource> for MessageEncoder
source§fn write_message(
item: Box<dyn DynSerializeMessage>,
writer: MessageWriter<'_, '_, Resource>,
)
fn write_message( item: Box<dyn DynSerializeMessage>, writer: MessageWriter<'_, '_, Resource>, )
Writes
item
as a message.source§fn compute_message_size(
item: &mut Box<dyn DynSerializeMessage>,
sizer: MessageSizer<'_>,
)
fn compute_message_size( item: &mut Box<dyn DynSerializeMessage>, sizer: MessageSizer<'_>, )
Computes the size of
item
as a message. Read moresource§impl MessageEncode<Message, Resource> for MessageEncoder
impl MessageEncode<Message, Resource> for MessageEncoder
source§fn write_message(item: Message, writer: MessageWriter<'_, '_, Resource>)
fn write_message(item: Message, writer: MessageWriter<'_, '_, Resource>)
Writes
item
as a message.source§fn compute_message_size(item: &mut Message, sizer: MessageSizer<'_>)
fn compute_message_size(item: &mut Message, sizer: MessageSizer<'_>)
Computes the size of
item
as a message. Read moreAuto Trait Implementations§
impl Freeze for Resource
impl !RefUnwindSafe for Resource
impl Send for Resource
impl Sync for Resource
impl Unpin for Resource
impl !UnwindSafe for Resource
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more