Struct Domain
struct Domain(_)
Specification of the communication domain for a socket.
This is a newtype wrapper around an integer which provides a nicer API in
addition to an injection point for documentation. Convenience constants such
as Domain::IPV4, Domain::IPV6, etc, are provided to avoid reaching
into libc for various constants.
This type is freely interconvertible with C's int type, however, if a raw
value needs to be provided.
Implementations
impl Domain
const fn for_address(address: SocketAddr) -> DomainReturns the correct domain for
address.
impl crate::Domain
impl Clone for Domain
fn clone(self: &Self) -> Domain
impl Copy for Domain
impl Debug for crate::Domain
fn fmt(self: &Self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result
impl Eq for Domain
impl Freeze for Domain
impl From for Domain
fn from(d: c_int) -> Domain
impl PartialEq for Domain
fn eq(self: &Self, other: &Domain) -> bool
impl RefUnwindSafe for Domain
impl Send for Domain
impl StructuralPartialEq for Domain
impl Sync for Domain
impl Unpin for Domain
impl UnwindSafe for Domain
impl<T> Any for Domain
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Domain
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Domain
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Domain
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for Domain
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Domain
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for Domain
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Domain
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Domain
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>