pub struct Hostname(/* private fields */);Expand description
A validated hostname.
This type ensures the hostname conforms to RFC 1035 and RFC 1123:
- Total length is at most 253 characters
- Each label (part between dots) is at most 63 characters
- Labels contain only ASCII letters, digits, and hyphens
- Labels do not start or end with a hyphen
- No empty labels (no consecutive dots, leading dots, or trailing dots)
Implementations§
Trait Implementations§
Source§impl EncodeSize for Hostname
impl EncodeSize for Hostname
Source§fn encode_size(&self) -> usize
fn encode_size(&self) -> usize
Returns the encoded size of this value (in bytes).
Source§impl Ord for Hostname
impl Ord for Hostname
Source§impl PartialOrd for Hostname
impl PartialOrd for Hostname
Source§impl Read for Hostname
impl Read for Hostname
impl Eq for Hostname
impl StructuralPartialEq for Hostname
Auto Trait Implementations§
impl Freeze for Hostname
impl RefUnwindSafe for Hostname
impl Send for Hostname
impl Sync for Hostname
impl Unpin for Hostname
impl UnwindSafe for Hostname
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)