#[non_exhaustive]pub enum RealAddr {
Internet(SocketAddr),
Bluetooth([u8; 6]),
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RealAddr
impl<'de> Deserialize<'de> for RealAddr
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RealAddr, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RealAddr, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<RealAddr> for EndpointAddr
impl From<RealAddr> for EndpointAddr
Source§fn from(addr: RealAddr) -> EndpointAddr
fn from(addr: RealAddr) -> EndpointAddr
Converts to this type from the input type.
Source§impl From<SocketAddr> for RealAddr
impl From<SocketAddr> for RealAddr
Source§fn from(value: SocketAddr) -> RealAddr
fn from(value: SocketAddr) -> RealAddr
Converts to this type from the input type.
Source§impl Serialize for RealAddr
impl Serialize for RealAddr
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl TryFrom<RealAddr> for SocketAddr
impl TryFrom<RealAddr> for SocketAddr
Source§type Error = TryIntoError<RealAddr>
type Error = TryIntoError<RealAddr>
The type returned in the event of a conversion error.
Source§fn try_from(value: RealAddr) -> Result<SocketAddr, TryIntoError<RealAddr>>
fn try_from(value: RealAddr) -> Result<SocketAddr, TryIntoError<RealAddr>>
Performs the conversion.
impl Copy for RealAddr
impl Eq for RealAddr
impl StructuralPartialEq for RealAddr
Auto Trait Implementations§
impl Freeze for RealAddr
impl RefUnwindSafe for RealAddr
impl Send for RealAddr
impl Sync for RealAddr
impl Unpin for RealAddr
impl UnwindSafe for RealAddr
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