Struct diem_types::network_address::DnsName [−][src]
pub struct DnsName(_);
Expand description
A minimally parsed DNS name. We don’t really do any checking other than enforcing:
- it is not an empty string
- it is not larger than 255 bytes
- it does not contain any forward slash ‘/’ characters
From the DNS name syntax RFC, the standard rules are:
- the total size <= 255 bytes
- each label <= 63 bytes
- any binary string is valid
So the restrictions we’re adding are (1) no ‘/’ characters and (2) the name
is a valid unicode string. We do this because ‘/’ characters are already our
protocol delimiter and Rust’s std::net::ToSocketAddrs
API requires a
&str
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for DnsName
impl UnwindSafe for DnsName
Blanket Implementations
Mutably borrows from an owned value. Read more
Generates a hash used only for tests.