#[repr(u32)]pub enum SocketFamily {
Unspecified = 0,
Ipv4 = 1,
Ipv6 = 2,
Raw = 3,
}Expand description
Socket address family.
Specifies the address family to use for the socket.
Variants§
Unspecified = 0
Unspecified address family.
Ipv4 = 1
IPv4 address family.
Ipv6 = 2
IPv6 address family.
Raw = 3
Raw packet interface.
Trait Implementations§
Source§impl Clone for SocketFamily
impl Clone for SocketFamily
Source§fn clone(&self) -> SocketFamily
fn clone(&self) -> SocketFamily
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SocketFamily
impl Debug for SocketFamily
Source§impl From<SocketFamily> for u32
impl From<SocketFamily> for u32
Source§fn from(enum_value: SocketFamily) -> Self
fn from(enum_value: SocketFamily) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SocketFamily
impl PartialEq for SocketFamily
Source§impl TryFrom<u32> for SocketFamily
impl TryFrom<u32> for SocketFamily
Source§type Error = TryFromPrimitiveError<SocketFamily>
type Error = TryFromPrimitiveError<SocketFamily>
The type returned in the event of a conversion error.
Source§impl TryFromPrimitive for SocketFamily
impl TryFromPrimitive for SocketFamily
const NAME: &'static str = "SocketFamily"
type Primitive = u32
type Error = TryFromPrimitiveError<SocketFamily>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
impl Copy for SocketFamily
impl Eq for SocketFamily
impl StructuralPartialEq for SocketFamily
Auto Trait Implementations§
impl Freeze for SocketFamily
impl RefUnwindSafe for SocketFamily
impl Send for SocketFamily
impl Sync for SocketFamily
impl Unpin for SocketFamily
impl UnwindSafe for SocketFamily
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more