pub trait SocketPacketWriting: SocketOperation {
// Required method
fn socket_packet_writer<'scheduler>(
&'scheduler self,
socket: &Self::Socket,
) -> Result<impl SocketPacketWriter + 'scheduler + use<'scheduler, Self>>
where Self: Sized,
Self::Socket: 'static;
}Expand description
Construct sequential packet output bound to this scheduler. Separate reader and writer handles permit concurrent reception and sending; backends can choose their own static writer.
The returned handle may borrow the scheduler, but never the temporary socket reference. It retains backend access independently, so the socket and handle can move together. Retire and drop handles before exclusively closing the socket.
Required Methods§
fn socket_packet_writer<'scheduler>( &'scheduler self, socket: &Self::Socket, ) -> Result<impl SocketPacketWriter + 'scheduler + use<'scheduler, Self>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".