pub struct DnsName(String);
Expand description
A type which encapsulates an owned string that is a syntactically valid DNS name.
Tuple Fields§
§0: String
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§
source§impl PartialEq for DnsName
impl PartialEq for DnsName
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