Struct socket2::Protocol[][src]

pub struct Protocol(_);
[]

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 the i32 type, however, if a raw value needs to be provided.

Methods

impl Protocol
[src]
[]

[]

Protocol corresponding to ICMPv4

[]

Protocol corresponding to ICMPv6

[]

Protocol corresponding to TCP

[]

Protocol corresponding to UDP

Trait Implementations

impl From<i32> for Protocol
[src]
[+]

[]

Performs the conversion.

impl From<Protocol> for i32
[src]
[+]

[]

Performs the conversion.

impl Copy for Protocol
[src]

impl Clone for Protocol
[src]
[+]

[]

Returns a copy of the value. Read more

[]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Protocol

impl Sync for Protocol