Struct rustix::net::Protocol

source ·
#[repr(transparent)]
pub struct Protocol(_);
Available on crate feature net only.
Expand description

IPPROTO_*

Implementations§

source§

impl Protocol

source

pub const IP: Self = _

IPPROTO_IP

source

pub const ICMP: Self = _

IPPROTO_ICMP

source

pub const IGMP: Self = _

IPPROTO_IGMP

source

pub const IPIP: Self = _

IPPROTO_IPIP

source

pub const TCP: Self = _

IPPROTO_TCP

source

pub const EGP: Self = _

IPPROTO_EGP

source

pub const PUP: Self = _

IPPROTO_PUP

source

pub const UDP: Self = _

IPPROTO_UDP

source

pub const IDP: Self = _

IPPROTO_IDP

source

pub const TP: Self = _

IPPROTO_TP

source

pub const DCCP: Self = _

IPPROTO_DCCP

source

pub const IPV6: Self = _

IPPROTO_IPV6

source

pub const RSVP: Self = _

IPPROTO_RSVP

source

pub const GRE: Self = _

IPPROTO_GRE

source

pub const ESP: Self = _

IPPROTO_ESP

source

pub const AH: Self = _

IPPROTO_AH

source

pub const MTP: Self = _

IPPROTO_MTP

source

pub const BEETPH: Self = _

IPPROTO_BEETPH

source

pub const ENCAP: Self = _

IPPROTO_ENCAP

source

pub const PIM: Self = _

IPPROTO_PIM

source

pub const COMP: Self = _

IPPROTO_COMP

source

pub const SCTP: Self = _

IPPROTO_SCTP

source

pub const UDPLITE: Self = _

IPPROTO_UDPLITE

source

pub const MPLS: Self = _

IPPROTO_MPLS

source

pub const ETHERNET: Self = _

IPPROTO_ETHERNET

source

pub const RAW: Self = _

IPPROTO_RAW

source

pub const MPTCP: Self = _

IPPROTO_MPTCP

source

pub const FRAGMENT: Self = _

IPPROTO_FRAGMENT

source

pub const ICMPV6: Self = _

IPPROTO_ICMPV6

source

pub const MH: Self = _

IPPROTO_MH

source

pub const ROUTING: Self = _

IPPROTO_ROUTING

source

pub const fn from_raw(raw: u32) -> Self

Constructs a Protocol from a raw integer.

source

pub const fn as_raw(self) -> u32

Returns the raw integer for this Protocol.

Trait Implementations§

source§

impl Clone for Protocol

source§

fn clone(&self) -> Protocol

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Protocol

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Protocol

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Hash for Protocol

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<Protocol> for Protocol

source§

fn eq(&self, other: &Protocol) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for Protocol

source§

impl Eq for Protocol

source§

impl StructuralEq for Protocol

source§

impl StructuralPartialEq for Protocol

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.