pub struct MulticastAddr(/* private fields */);Expand description
A socket address whose IP address is multicast.
Implementations§
Source§impl MulticastAddr
impl MulticastAddr
Sourcepub const fn new(addr: SocketAddr) -> Result<Self, ParseMulticastAddrError>
pub const fn new(addr: SocketAddr) -> Result<Self, ParseMulticastAddrError>
Creates the address after validating the IP component.
Sourcepub const fn as_socket_addr(&self) -> SocketAddr
pub const fn as_socket_addr(&self) -> SocketAddr
Returns the inner socket address.
Sourcepub const fn into_socket_addr(self) -> SocketAddr
pub const fn into_socket_addr(self) -> SocketAddr
Returns the inner socket address by value.
Sourcepub const fn ip_addr(&self) -> MulticastIpAddr
pub const fn ip_addr(&self) -> MulticastIpAddr
Returns the validated IP address wrapper.
Trait Implementations§
Source§impl Clone for MulticastAddr
impl Clone for MulticastAddr
Source§fn clone(&self) -> MulticastAddr
fn clone(&self) -> MulticastAddr
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MulticastAddr
Source§impl Debug for MulticastAddr
impl Debug for MulticastAddr
Source§impl<'de> Deserialize<'de> for MulticastAddr
Available on crate feature serde only.
impl<'de> Deserialize<'de> for MulticastAddr
Available on crate feature
serde only.Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for MulticastAddr
impl Display for MulticastAddr
impl Eq for MulticastAddr
Source§impl From<MulticastAddr> for SocketAddr
impl From<MulticastAddr> for SocketAddr
Source§fn from(value: MulticastAddr) -> Self
fn from(value: MulticastAddr) -> Self
Converts to this type from the input type.
Source§impl Hash for MulticastAddr
impl Hash for MulticastAddr
Source§impl Ord for MulticastAddr
impl Ord for MulticastAddr
Source§fn cmp(&self, other: &MulticastAddr) -> Ordering
fn cmp(&self, other: &MulticastAddr) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MulticastAddr
impl PartialEq for MulticastAddr
Source§fn eq(&self, other: &MulticastAddr) -> bool
fn eq(&self, other: &MulticastAddr) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for MulticastAddr
impl PartialOrd for MulticastAddr
Source§impl Serialize for MulticastAddr
Available on crate feature serde only.
impl Serialize for MulticastAddr
Available on crate feature
serde only.impl StructuralPartialEq for MulticastAddr
Source§impl TryFrom<SocketAddr> for MulticastAddr
impl TryFrom<SocketAddr> for MulticastAddr
Source§type Error = ParseMulticastAddrError
type Error = ParseMulticastAddrError
The type returned in the event of a conversion error.
Source§impl TryFrom<SocketAddrV4> for MulticastAddr
impl TryFrom<SocketAddrV4> for MulticastAddr
Source§type Error = ParseMulticastAddrError
type Error = ParseMulticastAddrError
The type returned in the event of a conversion error.
Source§impl TryFrom<SocketAddrV6> for MulticastAddr
impl TryFrom<SocketAddrV6> for MulticastAddr
Source§type Error = ParseMulticastAddrError
type Error = ParseMulticastAddrError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for MulticastAddr
impl RefUnwindSafe for MulticastAddr
impl Send for MulticastAddr
impl Sync for MulticastAddr
impl Unpin for MulticastAddr
impl UnsafeUnpin for MulticastAddr
impl UnwindSafe for MulticastAddr
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more