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]

[src]

Protocol corresponding to ICMPv4

[src]

Protocol corresponding to ICMPv6

[src]

Protocol corresponding to TCP

[src]

Protocol corresponding to UDP

Trait Implementations

impl From<i32> for Protocol
[src]

[src]

Performs the conversion.

impl From<Protocol> for i32
[src]

[src]

Performs the conversion.

impl Copy for Protocol
[src]

impl Clone for Protocol
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Protocol

impl Sync for Protocol