Struct Protocol
pub struct Protocol(/* private field */);
Protocol specification used for creating sockets via Socket::new.
This is a newtype wrapper around an integer which provides a nicer API in addition to an injection point for documentation.
This type is freely interconvertible with C's int type, however, if a raw
value needs to be provided.
Implementations
impl Protocol
const ICMPV4: Protocol = _;Protocol corresponding to
ICMPv4.const ICMPV6: Protocol = _;Protocol corresponding to
ICMPv6.const TCP: Protocol = _;Protocol corresponding to
TCP.const UDP: Protocol = _;Protocol corresponding to
UDP.const MPTCP: Protocol = _;Protocol corresponding to
MPTCP.const DCCP: Protocol = _;Protocol corresponding to
DCCP.const SCTP: Protocol = _;Protocol corresponding to
SCTP.const UDPLITE: Protocol = _;Protocol corresponding to
UDPLITE.
Trait Implementations
impl Clone for Protocol
fn clone(&self) -> Self
impl Copy for Protocol
impl Debug for Protocol
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for Protocol
impl From<i32> for Protocol
fn from(p: c_int) -> Protocol
impl PartialEq for Protocol
fn eq(&self, other: &Self) -> bool