pub struct DnsName(/* private fields */);
Expand description
A type which encapsulates an owned string that is a syntactically valid DNS name.
Implementations§
source§impl<'a> DnsName
impl<'a> DnsName
sourcepub fn borrow(&'a self) -> DnsNameRef<'a>
pub fn borrow(&'a self) -> DnsNameRef<'a>
Produce a borrowed DnsNameRef
from this owned DnsName
.
sourcepub fn try_from_ascii(bytes: &[u8]) -> Result<Self, InvalidDnsNameError>
pub fn try_from_ascii(bytes: &[u8]) -> Result<Self, InvalidDnsNameError>
Validate the given bytes are a DNS name if they are viewed as ASCII.
Trait Implementations§
impl Eq for DnsName
impl StructuralPartialEq for DnsName
Auto Trait Implementations§
impl Freeze for DnsName
impl RefUnwindSafe for DnsName
impl Send for DnsName
impl Sync for DnsName
impl Unpin for DnsName
impl UnwindSafe for DnsName
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)