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
.source§impl<Octs> FromStr for DohPath<Octs>where
Octs: FromBuilder,
<Octs as FromBuilder>::Builder: EmptyBuilder + FreezeBuilder<Octets = Octs>,
impl<Octs> FromStr for DohPath<Octs>where
Octs: FromBuilder,
<Octs as FromBuilder>::Builder: EmptyBuilder + FreezeBuilder<Octets = Octs>,
source§impl<O, OO> OctetsFrom<DohPath<O>> for DohPath<OO>where
OO: OctetsFrom<O>,
impl<O, OO> OctetsFrom<DohPath<O>> for DohPath<OO>where
OO: OctetsFrom<O>,
type Error = <OO as OctetsFrom<O>>::Error
source§impl<'a, Octs> ParseSvcParamValue<'a, Octs> for DohPath<Octs::Range<'a>>
impl<'a, Octs> ParseSvcParamValue<'a, Octs> for DohPath<Octs::Range<'a>>
source§fn parse_value(
key: SvcParamKey,
parser: &mut Parser<'a, Octs>,
) -> Result<Option<Self>, ParseError>
fn parse_value( key: SvcParamKey, parser: &mut Parser<'a, Octs>, ) -> Result<Option<Self>, ParseError>
source§impl<Octs: ?Sized> SvcParamValue for DohPath<Octs>
impl<Octs: ?Sized> SvcParamValue for DohPath<Octs>
source§fn key(&self) -> SvcParamKey
fn key(&self) -> SvcParamKey
impl<Octs: AsRef<[u8]>> Eq for DohPath<Octs>
Auto Trait Implementations§
impl<Octs> Freeze for DohPath<Octs>
impl<Octs> RefUnwindSafe for DohPath<Octs>where
Octs: RefUnwindSafe + ?Sized,
impl<Octs> Send for DohPath<Octs>
impl<Octs> Sync for DohPath<Octs>
impl<Octs> Unpin for DohPath<Octs>
impl<Octs> UnwindSafe for DohPath<Octs>where
Octs: UnwindSafe + ?Sized,
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)