#[repr(transparent)]pub struct SockaddrIn(_);
Available on crate feature
socket
only.Expand description
An IPv4 socket address
Implementations
Trait Implementations
sourceimpl AsRef<sockaddr_in> for SockaddrIn
impl AsRef<sockaddr_in> for SockaddrIn
sourcefn as_ref(&self) -> &sockaddr_in
fn as_ref(&self) -> &sockaddr_in
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl Clone for SockaddrIn
impl Clone for SockaddrIn
sourcefn clone(&self) -> SockaddrIn
fn clone(&self) -> SockaddrIn
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SockaddrIn
impl Debug for SockaddrIn
sourceimpl Display for SockaddrIn
impl Display for SockaddrIn
sourceimpl From<SocketAddrV4> for SockaddrIn
impl From<SocketAddrV4> for SockaddrIn
sourcefn from(addr: SocketAddrV4) -> Self
fn from(addr: SocketAddrV4) -> Self
Converts to this type from the input type.
sourceimpl FromStr for SockaddrIn
impl FromStr for SockaddrIn
sourceimpl Hash for SockaddrIn
impl Hash for SockaddrIn
sourceimpl PartialEq<SockaddrIn> for SockaddrIn
impl PartialEq<SockaddrIn> for SockaddrIn
sourcefn eq(&self, other: &SockaddrIn) -> bool
fn eq(&self, other: &SockaddrIn) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SockaddrIn) -> bool
fn ne(&self, other: &SockaddrIn) -> bool
This method tests for !=
.
sourceimpl SockaddrLike for SockaddrIn
impl SockaddrLike for SockaddrIn
sourceunsafe fn from_raw(
addr: *const sockaddr,
len: Option<socklen_t>
) -> Option<Self> where
Self: Sized,
unsafe fn from_raw(
addr: *const sockaddr,
len: Option<socklen_t>
) -> Option<Self> where
Self: Sized,
Unsafe constructor from a variable length source Read more
sourcefn as_ptr(&self) -> *const sockaddr
fn as_ptr(&self) -> *const sockaddr
Returns a raw pointer to the inner structure. Useful for FFI.
sourcefn family(&self) -> Option<AddressFamily>
fn family(&self) -> Option<AddressFamily>
Return the address family of this socket Read more
impl Copy for SockaddrIn
impl Eq for SockaddrIn
impl StructuralEq for SockaddrIn
impl StructuralPartialEq for SockaddrIn
Auto Trait Implementations
impl RefUnwindSafe for SockaddrIn
impl Send for SockaddrIn
impl Sync for SockaddrIn
impl Unpin for SockaddrIn
impl UnwindSafe for SockaddrIn
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more