Trait DatagramPeekInput
pub trait DatagramPeekInput: Send + 'static {
type Socket: DatagramSocket;
type Mapped<Peeked: DatagramSocket>: Send + 'static;
// Required methods
fn peek_socket_mut(&mut self) -> &mut Self::Socket;
fn map_peek_socket<Peeked, F>(self, map: F) -> Self::Mapped<Peeked>
where Peeked: DatagramSocket,
F: FnOnce(Self::Socket) -> Peeked;
}Available on crate features
std and udp only.Expand description
An input whose ingress datagrams an inspection may read ahead: a DatagramSocket itself,
or the ingress side of a BridgeIo whose egress was already prepared.
Required Associated Types§
type Socket: DatagramSocket
type Socket: DatagramSocket
The socket an inspection reads from.
type Mapped<Peeked: DatagramSocket>: Send + 'static
type Mapped<Peeked: DatagramSocket>: Send + 'static
This input with its peeked socket replaced, usually by a PrefixedDatagramSocket.
Required Methods§
fn peek_socket_mut(&mut self) -> &mut Self::Socket
fn peek_socket_mut(&mut self) -> &mut Self::Socket
The socket an inspection reads from.
fn map_peek_socket<Peeked, F>(self, map: F) -> Self::Mapped<Peeked>
fn map_peek_socket<Peeked, F>(self, map: F) -> Self::Mapped<Peeked>
Rebuild this input around map’s result for its peeked socket.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".