Expand description
Address representing either a hostname, IPv4 or IPv6.
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.
Hostname(Vec<u8>)
Hostname
Ipv4(Ipv4Addr)
IP version 4 address
Ipv6(Ipv6Addr)
IP version 6 address
Implementations
sourceimpl Address
impl Address
sourcepub fn is_hostname(&self) -> bool
pub fn is_hostname(&self) -> bool
Return true iff this is a Hostname.
Trait Implementations
sourceimpl Writeable for Address
impl Writeable for Address
sourcefn write_onto<B: Writer + ?Sized>(&self, w: &mut B)
fn write_onto<B: Writer + ?Sized>(&self, w: &mut B)
Encode this object into the writer b
.
impl Eq for Address
impl StructuralEq for Address
impl StructuralPartialEq for Address
Auto Trait Implementations
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnwindSafe for Address
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
sourceimpl<W> WriteableOnce for W where
W: Writeable,
impl<W> WriteableOnce for W where
W: Writeable,
sourcefn write_into<B>(self, b: &mut B) where
B: Writer + ?Sized,
fn write_into<B>(self, b: &mut B) where
B: Writer + ?Sized,
Encode this object into the writer b
, and consume it.