pub enum Host<S> {
Ip(IpAddr),
Domain(S),
}Expand description
The host name
Variants§
Implementations§
Source§impl<S> Host<S>
impl<S> Host<S>
Sourcepub fn unwrap_ip(self) -> IpAddr
pub fn unwrap_ip(self) -> IpAddr
Unwraps this value to the Host::Ip variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_ip_ref(&self) -> &IpAddr
pub fn unwrap_ip_ref(&self) -> &IpAddr
Unwraps this reference to the Host::Ip variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_ip_mut(&mut self) -> &mut IpAddr
pub fn unwrap_ip_mut(&mut self) -> &mut IpAddr
Unwraps this mutable reference to the Host::Ip variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_domain(self) -> S
pub fn unwrap_domain(self) -> S
Unwraps this value to the Host::Domain variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_domain_ref(&self) -> &S
pub fn unwrap_domain_ref(&self) -> &S
Unwraps this reference to the Host::Domain variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_domain_mut(&mut self) -> &mut S
pub fn unwrap_domain_mut(&mut self) -> &mut S
Unwraps this mutable reference to the Host::Domain variant.
Panics if this value is of any other type.
Source§impl<'a> Host<&'a str>
impl<'a> Host<&'a str>
Sourcepub fn try_from_ascii_str(input: &'a str) -> Result<Self, ParseAsciiHostError>
pub fn try_from_ascii_str(input: &'a str) -> Result<Self, ParseAsciiHostError>
Parses an ASCII Host from &str.
Unlike Host::try_from or Host::from_str, this method does not perform any percent decoding
or punycode decoding. If the input is not ASCII, it will return an error.
§Example
use hostaddr::Host;
let host = Host::try_from_ascii_str("example.com").unwrap();
assert_eq!(host.unwrap_domain(), "example.com");
// This will return an error because the domain is not ASCII.
assert!(Host::try_from_ascii_str("测试.中国").is_err());
// Thie will not return an error, even though the human-readable domain is not ASCII.
let host = Host::try_from_ascii_str("xn--0zwm56d.xn--fiqs8s").unwrap();
assert_eq!(host.unwrap_domain(), "xn--0zwm56d.xn--fiqs8s");Sourcepub const fn as_bytes(&self) -> Host<&'a [u8]>
pub const fn as_bytes(&self) -> Host<&'a [u8]>
Converts the domain to a Host<&'a str>.
§Example
use hostaddr::Host;
let host = Host::try_from_ascii_str("example.com").unwrap();
assert_eq!(host.as_bytes().unwrap_domain(), b"example.com");
let host = Host::try_from_ascii_str("127.0.0.1").unwrap();
assert_eq!(host.as_bytes().unwrap_ip(), "127.0.0.1".parse::<core::net::IpAddr>().unwrap());Source§impl<'a> Host<&'a [u8]>
impl<'a> Host<&'a [u8]>
Sourcepub fn try_from_ascii_bytes(
input: &'a [u8],
) -> Result<Self, ParseAsciiHostError>
pub fn try_from_ascii_bytes( input: &'a [u8], ) -> Result<Self, ParseAsciiHostError>
Parses an ASCII Host from &[u8].
Unlike Host::try_from or Host::from_str, this method does not perform any percent decoding
or punycode decoding. If the input is not ASCII, it will return an error.
§Example
use hostaddr::Host;
let host = Host::try_from_ascii_bytes(b"example.com").unwrap();
assert_eq!(host.unwrap_domain(), b"example.com");
// This will return an error because the domain is not ASCII.
assert!(Host::try_from_ascii_bytes("测试.中国".as_bytes()).is_err());
// Thie will not return an error, even though the human-readable domain is not ASCII.
let host = Host::try_from_ascii_bytes(b"xn--0zwm56d.xn--fiqs8s").unwrap();
assert_eq!(host.unwrap_domain(), b"xn--0zwm56d.xn--fiqs8s");Sourcepub const fn as_str(&self) -> Host<&'a str>
pub const fn as_str(&self) -> Host<&'a str>
Converts the domain to a Host<&'a str>.
§Example
use hostaddr::Host;
let domain = Host::try_from_ascii_bytes(b"example.com").unwrap();
assert_eq!(domain.as_str().unwrap_domain(), "example.com");
let host = Host::try_from_ascii_bytes(b"127.0.0.1").unwrap();
assert_eq!(host.as_str().unwrap_ip(), "127.0.0.1".parse::<core::net::IpAddr>().unwrap());Source§impl<S> Host<S>
impl<S> Host<S>
Sourcepub const fn is_ipv4(&self) -> bool
pub const fn is_ipv4(&self) -> bool
Returns true if the host is an Ipv4 address.
§Example
use hostaddr::Host;
let host: Host<&str> = Host::from_ip("127.0.0.1".parse().unwrap());
assert!(host.is_ipv4());Sourcepub const fn is_ipv6(&self) -> bool
pub const fn is_ipv6(&self) -> bool
Returns true if the host is an Ipv6 address.
§Example
use hostaddr::Host;
let host: Host<&str> = Host::from_ip("::1".parse().unwrap());
assert!(host.is_ipv6());Sourcepub const fn as_ref(&self) -> Host<&S>
pub const fn as_ref(&self) -> Host<&S>
Converts from &Host<S> to Host<&S>.
§Example
use std::sync::Arc;
use hostaddr::Host;
let host = "example.com".parse::<Host<Arc<str>>>().unwrap();
assert_eq!("example.com", &**host.as_ref().unwrap_domain());Sourcepub fn as_deref(&self) -> Host<&S::Target>where
S: Deref,
pub fn as_deref(&self) -> Host<&S::Target>where
S: Deref,
Converts from Host<S> (or &Host<S>) to Host<&S::Target>.
§Example
use std::{sync::Arc, net::IpAddr};
use hostaddr::Host;
let host: Host<Arc<str>> = "example.com".try_into().unwrap();
assert_eq!("example.com", host.as_deref().unwrap_domain());
let host: Host<Arc<str>> = "127.0.0.1".try_into().unwrap();
assert_eq!("127.0.0.1".parse::<IpAddr>().unwrap(), host.as_deref().unwrap_ip());Sourcepub const fn ip(&self) -> Option<&IpAddr>
pub const fn ip(&self) -> Option<&IpAddr>
Returns Some(ip) if the host is an IP address.
§Example
use hostaddr::Host;
use std::net::IpAddr;
let host: Host<String> = "127.0.0.1".parse().unwrap();
assert_eq!(Some("127.0.0.1".parse().unwrap()), host.ip().copied());
let host: Host<String> = "example.com".parse().unwrap();
assert!(host.ip().is_none());Sourcepub const fn domain(&self) -> Option<&S>
pub const fn domain(&self) -> Option<&S>
Returns Some(domain) if the host is a domain name.
§Example
use hostaddr::Host;
let host: Host<String> = "example.com".parse().unwrap();
assert_eq!(Some("example.com".to_string()), host.domain().cloned());
let host: Host<String> = "127.0.0.1".parse().unwrap();
assert!(host.domain().is_none());Source§impl<S> Host<&S>
impl<S> Host<&S>
Sourcepub const fn copied(self) -> Host<S>where
S: Copy,
pub const fn copied(self) -> Host<S>where
S: Copy,
Maps an Host<&S> to an Host<S> by copying the contents of the
host.
§Example
use hostaddr::{Host, Buffer};
use std::net::IpAddr;
let host: Host<Buffer> = Host::try_from("example.com").unwrap();
assert_eq!("example.com", host.as_ref().copied().unwrap_domain().as_str());
let host: Host<Buffer> = "127.0.0.1".parse().unwrap();
assert_eq!("127.0.0.1".parse::<IpAddr>().unwrap(), host.as_ref().copied().unwrap_ip());Sourcepub fn cloned(self) -> Host<S>where
S: Clone,
pub fn cloned(self) -> Host<S>where
S: Clone,
Maps an Host<&S> to an Host<S> by cloning the contents of the
host.
§Example
use hostaddr::Host;
use std::net::IpAddr;
let host: Host<String> = "example.com".parse().unwrap();
assert_eq!("example.com", host.as_ref().cloned().unwrap_domain().as_str());
let host: Host<String> = "127.0.0.1".parse().unwrap();
assert_eq!("127.0.0.1".parse::<IpAddr>().unwrap(), host.as_ref().cloned().unwrap_ip());Trait Implementations§
Source§impl<'a> Arbitrary<'a> for Host<Arc<[u8]>>
Available on crate feature arbitrary and (crate features std or alloc), or (crate features std or alloc) only.
impl<'a> Arbitrary<'a> for Host<Arc<[u8]>>
arbitrary and (crate features std or alloc), or (crate features std or alloc) only.Source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl<'a> Arbitrary<'a> for Host<Arc<[u8]>>
Available on crate feature triomphe_0_1 and (crate feature arbitrary and (crate features std or alloc), or (crate features std or alloc)) only.
impl<'a> Arbitrary<'a> for Host<Arc<[u8]>>
triomphe_0_1 and (crate feature arbitrary and (crate features std or alloc), or (crate features std or alloc)) only.Source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl<'a> Arbitrary<'a> for Host<Arc<str>>
Available on crate feature arbitrary and (crate features std or alloc), or (crate features std or alloc) only.
impl<'a> Arbitrary<'a> for Host<Arc<str>>
arbitrary and (crate features std or alloc), or (crate features std or alloc) only.Source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl<'a> Arbitrary<'a> for Host<Arc<str>>
Available on crate feature triomphe_0_1 and (crate feature arbitrary and (crate features std or alloc), or (crate features std or alloc)) only.
impl<'a> Arbitrary<'a> for Host<Arc<str>>
triomphe_0_1 and (crate feature arbitrary and (crate features std or alloc), or (crate features std or alloc)) only.Source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl<'a> Arbitrary<'a> for Host<Box<[u8]>>
Available on crate feature arbitrary and (crate features std or alloc), or (crate features std or alloc) only.
impl<'a> Arbitrary<'a> for Host<Box<[u8]>>
arbitrary and (crate features std or alloc), or (crate features std or alloc) only.Source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl<'a> Arbitrary<'a> for Host<Box<str>>
Available on crate feature arbitrary and (crate features std or alloc), or (crate features std or alloc) only.
impl<'a> Arbitrary<'a> for Host<Box<str>>
arbitrary and (crate features std or alloc), or (crate features std or alloc) only.Source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl<'a> Arbitrary<'a> for Host<Bytes>
Available on crate feature arbitrary and (crate features std or alloc), or (crate features std or alloc) only.
impl<'a> Arbitrary<'a> for Host<Bytes>
arbitrary and (crate features std or alloc), or (crate features std or alloc) only.Source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl<'a> Arbitrary<'a> for Host<Cow<'a, str>>
Available on crate feature arbitrary and (crate features std or alloc), or (crate features std or alloc) only.
impl<'a> Arbitrary<'a> for Host<Cow<'a, str>>
arbitrary and (crate features std or alloc), or (crate features std or alloc) only.Source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl<'a> Arbitrary<'a> for Host<Rc<[u8]>>
Available on crate feature arbitrary and (crate features std or alloc), or (crate features std or alloc) only.
impl<'a> Arbitrary<'a> for Host<Rc<[u8]>>
arbitrary and (crate features std or alloc), or (crate features std or alloc) only.Source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl<'a> Arbitrary<'a> for Host<Rc<str>>
Available on crate feature arbitrary and (crate features std or alloc), or (crate features std or alloc) only.
impl<'a> Arbitrary<'a> for Host<Rc<str>>
arbitrary and (crate features std or alloc), or (crate features std or alloc) only.Source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl<'a> Arbitrary<'a> for Host<SmolStr>
Available on crate feature arbitrary and (crate features std or alloc), or (crate features std or alloc) only.
impl<'a> Arbitrary<'a> for Host<SmolStr>
arbitrary and (crate features std or alloc), or (crate features std or alloc) only.Source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl<'a> Arbitrary<'a> for Host<String>
Available on crate feature arbitrary and (crate features std or alloc), or (crate features std or alloc) only.
impl<'a> Arbitrary<'a> for Host<String>
arbitrary and (crate features std or alloc), or (crate features std or alloc) only.Source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl<'a> Arbitrary<'a> for Host<Vec<u8>>
Available on crate feature arbitrary and (crate features std or alloc), or (crate features std or alloc) only.
impl<'a> Arbitrary<'a> for Host<Vec<u8>>
arbitrary and (crate features std or alloc), or (crate features std or alloc) only.Source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl Arbitrary for Host<Arc<[u8]>>
Available on crate feature quickcheck and (crate features std or alloc), or (crate features std or alloc) only.
impl Arbitrary for Host<Arc<[u8]>>
quickcheck and (crate features std or alloc), or (crate features std or alloc) only.Source§impl Arbitrary for Host<Arc<[u8]>>
Available on crate feature triomphe_0_1 and (crate feature quickcheck and (crate features std or alloc), or (crate features std or alloc)) only.
impl Arbitrary for Host<Arc<[u8]>>
triomphe_0_1 and (crate feature quickcheck and (crate features std or alloc), or (crate features std or alloc)) only.Source§impl Arbitrary for Host<Arc<str>>
Available on crate feature quickcheck and (crate features std or alloc), or (crate features std or alloc) only.
impl Arbitrary for Host<Arc<str>>
quickcheck and (crate features std or alloc), or (crate features std or alloc) only.Source§impl Arbitrary for Host<Arc<str>>
Available on crate feature triomphe_0_1 and (crate feature quickcheck and (crate features std or alloc), or (crate features std or alloc)) only.
impl Arbitrary for Host<Arc<str>>
triomphe_0_1 and (crate feature quickcheck and (crate features std or alloc), or (crate features std or alloc)) only.Source§impl Arbitrary for Host<Box<[u8]>>
Available on crate feature quickcheck and (crate features std or alloc), or (crate features std or alloc) only.
impl Arbitrary for Host<Box<[u8]>>
quickcheck and (crate features std or alloc), or (crate features std or alloc) only.Source§impl Arbitrary for Host<Box<str>>
Available on crate feature quickcheck and (crate features std or alloc), or (crate features std or alloc) only.
impl Arbitrary for Host<Box<str>>
quickcheck and (crate features std or alloc), or (crate features std or alloc) only.Source§impl Arbitrary for Host<Bytes>
Available on crate feature quickcheck and (crate features std or alloc), or (crate features std or alloc) only.
impl Arbitrary for Host<Bytes>
quickcheck and (crate features std or alloc), or (crate features std or alloc) only.Source§impl Arbitrary for Host<Rc<[u8]>>
Available on crate feature quickcheck and (crate features std or alloc), or (crate features std or alloc) only.
impl Arbitrary for Host<Rc<[u8]>>
quickcheck and (crate features std or alloc), or (crate features std or alloc) only.Source§impl Arbitrary for Host<Rc<str>>
Available on crate feature quickcheck and (crate features std or alloc), or (crate features std or alloc) only.
impl Arbitrary for Host<Rc<str>>
quickcheck and (crate features std or alloc), or (crate features std or alloc) only.Source§impl Arbitrary for Host<SmolStr>
Available on crate feature quickcheck and (crate features std or alloc), or (crate features std or alloc) only.
impl Arbitrary for Host<SmolStr>
quickcheck and (crate features std or alloc), or (crate features std or alloc) only.Source§impl Arbitrary for Host<String>
Available on crate feature quickcheck and (crate features std or alloc), or (crate features std or alloc) only.
impl Arbitrary for Host<String>
quickcheck and (crate features std or alloc), or (crate features std or alloc) only.Source§impl Arbitrary for Host<Vec<u8>>
Available on crate feature quickcheck and (crate features std or alloc), or (crate features std or alloc) only.
impl Arbitrary for Host<Vec<u8>>
quickcheck and (crate features std or alloc), or (crate features std or alloc) only.Source§impl<S: CheapClone> CheapClone for Host<S>
Available on crate feature cheap-clone only.
impl<S: CheapClone> CheapClone for Host<S>
cheap-clone only.Source§fn cheap_clone(&self) -> Self
fn cheap_clone(&self) -> Self
Source§impl<'de, S> Deserialize<'de> for Host<S>where
S: Deserialize<'de>,
impl<'de, S> Deserialize<'de> for Host<S>where
S: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<S: Ord> Ord for Host<S>
impl<S: Ord> Ord for Host<S>
Source§impl<S: PartialOrd> PartialOrd for Host<S>
impl<S: PartialOrd> PartialOrd for Host<S>
impl<S: Copy> Copy for Host<S>
impl<S: Eq> Eq for Host<S>
impl<S> StructuralPartialEq for Host<S>
Auto Trait Implementations§
impl<S> Freeze for Host<S>where
S: Freeze,
impl<S> RefUnwindSafe for Host<S>where
S: RefUnwindSafe,
impl<S> Send for Host<S>where
S: Send,
impl<S> Sync for Host<S>where
S: Sync,
impl<S> Unpin for Host<S>where
S: Unpin,
impl<S> UnwindSafe for Host<S>where
S: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more