Available on crate feature
experimental-udp only.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) -> EncodeResult<()>
fn write_onto<B: Writer + ?Sized>(&self, w: &mut B) -> EncodeResult<()>
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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<W> WriteableOnce for Wwhere
W: Writeable,
impl<W> WriteableOnce for Wwhere
W: Writeable,
sourcefn write_into<B>(self, b: &mut B) -> Result<(), EncodeError>where
B: Writer + ?Sized,
fn write_into<B>(self, b: &mut B) -> Result<(), EncodeError>where
B: Writer + ?Sized,
Encode this object into the writer
b, and consume it.