pub struct DohPath<Octs: ?Sized>(/* private fields */);
Expand description
The ‘dohpath’ service parameter value.
This value includes the URI template to be used when directing DNS-over-HTTPS (DoH) queries to a service. This template is encoded as UTF-8. URI templates are described in RFC 6570
This value type is described as part of the specification for using service bindings with DNS-over-HTTPS, currently draft-ietf-add-svcb-dns.
Implementations§
source§impl<Octs> DohPath<Octs>
impl<Octs> DohPath<Octs>
sourcepub unsafe fn from_octets_unchecked(octets: Octs) -> Self
pub unsafe fn from_octets_unchecked(octets: Octs) -> Self
Creates a new value from octets without checking.
§Safety
The caller has to ensure that octets
contains a properly
formated value of at most 65,535 octets.
source§impl DohPath<[u8]>
impl DohPath<[u8]>
sourcepub unsafe fn from_slice_unchecked(slice: &[u8]) -> &Self
pub unsafe fn from_slice_unchecked(slice: &[u8]) -> &Self
Creates a new value for a slice without checking.
§Safety
The caller has to ensure that slice
contains a properly
formated value of at most 65,535 octets.
source§impl<Octs: AsRef<[u8]>> DohPath<Octs>
impl<Octs: AsRef<[u8]>> DohPath<Octs>
sourcepub fn from_octets(octets: Octs) -> Result<Self, LongSvcParam>
pub fn from_octets(octets: Octs) -> Result<Self, LongSvcParam>
Creates a ‘dohpath’ value from its content.
Returns an error if octets
is longer than 65,535 bytes.
source§impl DohPath<[u8]>
impl DohPath<[u8]>
sourcepub fn from_slice(slice: &[u8]) -> Result<&Self, LongSvcParam>
pub fn from_slice(slice: &[u8]) -> Result<&Self, LongSvcParam>
Creates a ‘dohpath’ value from a slice of its content.
Returns an error if slice
is longer than 65,535 bytes.
Trait Implementations§
source§impl<Octs: AsRef<[u8]> + ?Sized> ComposeSvcParamValue for DohPath<Octs>
impl<Octs: AsRef<[u8]> + ?Sized> ComposeSvcParamValue for DohPath<Octs>
source§fn compose_len(&self) -> u16
fn compose_len(&self) -> u16
source§fn compose_value<Target: OctetsBuilder + ?Sized>(
&self,
target: &mut Target,
) -> Result<(), Target::AppendError>
fn compose_value<Target: OctetsBuilder + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
target
.