domain::rdata::svcb

Type Alias Https

Source
pub type Https<Octs, Name> = SvcbRdata<HttpsVariant, Octs, Name>;
Expand description

A type alias for record data of the HTTPS record type.

The HTTPS record type is the service binding type for the HTTPS service.

See SvcbRdata<..> for details.

Aliased Type§

struct Https<Octs, Name> { /* private fields */ }

Implementations

Source§

impl<Variant, Octs, Name> SvcbRdata<Variant, Octs, Name>

Source

pub fn new( priority: u16, target: Name, params: SvcParams<Octs>, ) -> Result<Self, LongRecordData>
where Octs: AsRef<[u8]>, Name: ToDname,

Create a new value from its components.

Returns an error if the wire format of the record data would exceed the length of 65,535 octets.

Source

pub unsafe fn new_unchecked( priority: u16, target: Name, params: SvcParams<Octs>, ) -> Self

Creates a new value from its components without checking.

§Safety

The called must ensure that the wire format of the record data does not exceed a length of 65,535 octets.

Source§

impl<Variant, Octs, Name> SvcbRdata<Variant, Octs, Name>

Source

pub fn priority(&self) -> u16

Returns the priority.

Source

pub fn is_alias(&self) -> bool

Returns whether this service binding is in alias mode.

This is identical to self.priority() == 0.

Source

pub fn is_service(&self) -> bool

Returns whether this service binding is in service mode.

This is identical to self.priority() != 0.

Source

pub fn target(&self) -> &Name

Returns the target name.

Note the target name won’t be translated to the owner automatically in service mode if it equals the root name.

Source

pub fn params(&self) -> &SvcParams<Octs>

Returns the parameters.

Source§

impl<Variant, Octs: AsRef<[u8]>> SvcbRdata<Variant, Octs, ParsedDname<Octs>>

Source

pub fn parse<'a, Src: Octets<Range<'a> = Octs> + ?Sized + 'a>( parser: &mut Parser<'a, Src>, ) -> Result<Self, ParseError>

Parses service bindings record data from its wire format.

Trait Implementations

Source§

impl<Variant: Clone, Octs: Clone, Name: Clone> Clone for SvcbRdata<Variant, Octs, Name>

Source§

fn clone(&self) -> SvcbRdata<Variant, Octs, Name>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Variant, Octs, Name> ComposeRecordData for SvcbRdata<Variant, Octs, Name>
where Self: RecordData, Octs: AsRef<[u8]>, Name: ToDname,

Source§

fn rdlen(&self, _compress: bool) -> Option<u16>

Returns the length of the record data if available. Read more
Source§

fn compose_rdata<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>

Appends the wire format of the record data into target.
Source§

fn compose_canonical_rdata<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>

Appends the canonical wire format of the record data into target.
Source§

fn compose_len_rdata<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>

Appends the record data prefixed with its length.
Source§

fn compose_canonical_len_rdata<Target: Composer + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>

Appends the record data prefixed with its length.
Source§

impl<Variant, Octs, Name> Debug for SvcbRdata<Variant, Octs, Name>
where Octs: Octets, Name: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Variant, Octs, Name> Display for SvcbRdata<Variant, Octs, Name>
where Octs: Octets, Name: Display,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Variant, Octs, TOcts, Name, TName> FlattenInto<SvcbRdata<Variant, TOcts, TName>> for SvcbRdata<Variant, Octs, Name>
where TOcts: OctetsFrom<Octs>, Name: FlattenInto<TName, AppendError = TOcts::Error>,

Source§

type AppendError = <TOcts as OctetsFrom<Octs>>::Error

Source§

fn try_flatten_into( self, ) -> Result<SvcbRdata<Variant, TOcts, TName>, TOcts::Error>

Source§

fn flatten_into(self) -> Target
where Self::AppendError: Into<Infallible>,

Source§

impl<Variant, Octs: AsRef<[u8]>, Name: Hash> Hash for SvcbRdata<Variant, Octs, Name>

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<Variant, Octs, SrcOctets, Name, SrcName> OctetsFrom<SvcbRdata<Variant, SrcOctets, SrcName>> for SvcbRdata<Variant, Octs, Name>
where Octs: OctetsFrom<SrcOctets>, Name: OctetsFrom<SrcName, Error = Octs::Error>,

Source§

type Error = <Octs as OctetsFrom<SrcOctets>>::Error

Source§

fn try_octets_from( source: SvcbRdata<Variant, SrcOctets, SrcName>, ) -> Result<Self, Self::Error>

Performs the conversion.
Source§

fn octets_from(source: Source) -> Self
where Self::Error: Into<Infallible>,

Performs an infallible conversion.
Source§

impl<Variant, Octs: AsRef<[u8]>, Name: ToDname> Ord for SvcbRdata<Variant, Octs, Name>

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<'a, Octs: Octets + ?Sized> ParseRecordData<'a, Octs> for SvcbRdata<HttpsVariant, Octs::Range<'a>, ParsedDname<Octs::Range<'a>>>

Source§

fn parse_rdata( rtype: Rtype, parser: &mut Parser<'a, Octs>, ) -> Result<Option<Self>, ParseError>

Parses the record data. Read more
Source§

impl<Variant, OtherVariant, Octs, OtherOcts, Name, OtherName> PartialEq<SvcbRdata<OtherVariant, OtherOcts, OtherName>> for SvcbRdata<Variant, Octs, Name>
where Octs: AsRef<[u8]>, OtherOcts: AsRef<[u8]>, Name: ToDname, OtherName: ToDname,

Source§

fn eq(&self, other: &SvcbRdata<OtherVariant, OtherOcts, OtherName>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<Variant, OtherVariant, Octs, OtherOcts, Name, OtherName> PartialOrd<SvcbRdata<OtherVariant, OtherOcts, OtherName>> for SvcbRdata<Variant, Octs, Name>
where Octs: AsRef<[u8]>, OtherOcts: AsRef<[u8]>, Name: ToDname, OtherName: ToDname,

Source§

fn partial_cmp( &self, other: &SvcbRdata<OtherVariant, OtherOcts, OtherName>, ) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<Octs, Name> RecordData for SvcbRdata<HttpsVariant, Octs, Name>

Source§

fn rtype(&self) -> Rtype

Returns the record type associated with this record data instance. Read more
Source§

impl<Variant, Octs: AsRef<[u8]>, Name: ToDname> Eq for SvcbRdata<Variant, Octs, Name>