pub struct Host(/* private fields */);
Expand description
IRI authority host.
Implementations§
Source§impl Host
impl Host
Sourcepub fn new<T: ?Sized + AsRef<[u8]>>(input: &T) -> Result<&Self, InvalidHost<&T>>
pub fn new<T: ?Sized + AsRef<[u8]>>(input: &T) -> Result<&Self, InvalidHost<&T>>
Creates a new URI host by parsing the input
value
Sourcepub const unsafe fn new_unchecked(input: &[u8]) -> &Self
pub const unsafe fn new_unchecked(input: &[u8]) -> &Self
Creates a new URI host from the input
value without validation.
§Safety
The input data must be a valid URI host.