pub struct Domain(/* private fields */);
Expand description
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§
source§impl Domain
impl Domain
sourcepub const fn for_address(address: SocketAddr) -> Domain
pub const fn for_address(address: SocketAddr) -> Domain
Returns the correct domain for address
.
Trait Implementations§
source§impl PartialEq for Domain
impl PartialEq for Domain
impl Copy for Domain
impl Eq for Domain
impl StructuralPartialEq for Domain
Auto Trait Implementations§
impl Freeze for Domain
impl RefUnwindSafe for Domain
impl Send for Domain
impl Sync for Domain
impl Unpin for Domain
impl UnwindSafe for Domain
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)