#[non_exhaustive]pub enum Host {
IPv4(Ipv4Addr),
IPv6(Ipv6Addr),
Hostname(String),
}Expand description
Host component of a SIP URI.
IPv6 addresses are stored without brackets; fmt::Display adds brackets
when formatting in URI context via Host::fmt_uri.
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.
IPv4(Ipv4Addr)
IPv4 address.
IPv6(Ipv6Addr)
IPv6 address (stored without brackets).
Hostname(String)
DNS hostname.
Implementations§
Trait Implementations§
impl Eq for Host
impl StructuralPartialEq for Host
Auto Trait Implementations§
impl Freeze for Host
impl RefUnwindSafe for Host
impl Send for Host
impl Sync for Host
impl Unpin for Host
impl UnsafeUnpin for Host
impl UnwindSafe for Host
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