Struct rustix::net::Protocol

#[repr(transparent)]
pub struct Protocol(_);
Documentation

IPPROTO_*

Implementations

impl Protocol
const IP: Self = _

IPPROTO_IP

const ICMP: Self = _

IPPROTO_ICMP

const IGMP: Self = _

IPPROTO_IGMP

const IPIP: Self = _

IPPROTO_IPIP

const TCP: Self = _

IPPROTO_TCP

const EGP: Self = _

IPPROTO_EGP

const PUP: Self = _

IPPROTO_PUP

const UDP: Self = _

IPPROTO_UDP

const IDP: Self = _

IPPROTO_IDP

const TP: Self = _

IPPROTO_TP

const DCCP: Self = _

IPPROTO_DCCP

const IPV6: Self = _

IPPROTO_IPV6

const RSVP: Self = _

IPPROTO_RSVP

const GRE: Self = _

IPPROTO_GRE

const ESP: Self = _

IPPROTO_ESP

const AH: Self = _

IPPROTO_AH

const MTP: Self = _

IPPROTO_MTP

const BEETPH: Self = _

IPPROTO_BEETPH

const ENCAP: Self = _

IPPROTO_ENCAP

const PIM: Self = _

IPPROTO_PIM

const COMP: Self = _

IPPROTO_COMP

const SCTP: Self = _

IPPROTO_SCTP

const UDPLITE: Self = _

IPPROTO_UDPLITE

const MPLS: Self = _

IPPROTO_MPLS

const ETHERNET: Self = _

IPPROTO_ETHERNET

const RAW: Self = _

IPPROTO_RAW

const MPTCP: Self = _

IPPROTO_MPTCP

const FRAGMENT: Self = _

IPPROTO_FRAGMENT

const ICMPV6: Self = _

IPPROTO_ICMPV6

const MH: Self = _

IPPROTO_MH

const ROUTING: Self = _

IPPROTO_ROUTING

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

Constructs a Protocol from a raw integer.

pub const fn as_raw(Self) -> u32

Returns the raw integer for this Protocol.

Trait Implementations

impl Clone for Protocol
fn clone(&Self) -> Protocol
impl Copy for Protocol
impl Debug for Protocol
fn fmt(&Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl Default for Protocol
fn default() -> Self
impl Eq for Protocol
impl Hash for Protocol
fn hash<__H: $crate::hash::Hasher>(&Self, state: &mut __H) -> ()
impl PartialEq<Protocol> for Protocol
fn eq(&Self, other: &Protocol) -> bool
fn ne(&Self, other: &Protocol) -> bool

Auto Trait Implementations

impl Send for Protocol
impl Sync for Protocol
impl Unpin for Protocol
impl UnwindSafe for Protocol

Blanket Implementations

impl<T> Any for T
where
    T: 'static + ?Sized,
fn type_id(&Self) -> TypeId
impl<T> Borrow<T> for T
where
    T: ?Sized,
fn borrow(&Self) -> &T
impl<T> BorrowMut<T> for T
where
    T: ?Sized,
fn borrow_mut(&mut Self) -> &mut T
impl<T> From<T> for T
fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into<U> for T
where
    U: From<T>,
fn into(Self) -> U

Calls U::from(self).

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

impl<T> ToOwned for T
where
    T: Clone,
type Owned = T
fn to_owned(&Self) -> T
fn clone_into(&Self, target: &mut T)
impl<T, U> TryFrom<U> for T
where
    U: Into<T>,
type Error = Infallible
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for T
where
    U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
fn try_into(Self) -> Result<U, <U as TryFrom<T>>::Error>