Struct ServiceBinding
pub struct ServiceBinding { /* private fields */ }dns and std only.Expand description
Decoded RDATA shared by SVCB and HTTPS resource records.
This client-side wire model is intentionally parse-only. DNS record construction and authoritative-server encoding are outside its scope.
Implementations§
§impl ServiceBinding
impl ServiceBinding
pub fn parse_rdata(
rdata: &[u8],
) -> Result<ServiceBinding, ServiceBindingParseError>
pub fn parse_rdata( rdata: &[u8], ) -> Result<ServiceBinding, ServiceBindingParseError>
Parse one complete borrowed SVCB-compatible RDATA value.
The RDATA is copied once into shared immutable storage. Use
ServiceBinding::parse_rdata_bytes when the caller already owns
Bytes to avoid that copy.
pub fn parse_rdata_bytes(
rdata: &Bytes,
) -> Result<ServiceBinding, ServiceBindingParseError>
pub fn parse_rdata_bytes( rdata: &Bytes, ) -> Result<ServiceBinding, ServiceBindingParseError>
Parse one complete, owned SVCB-compatible RDATA value without copying opaque parameter bytes.
This enforces the wire-format and self-consistency requirements in RFC 9460 Sections 2.2, 2.4.3, 7, and 8. RFC 9848 ECHConfigList framing is also checked, without interpreting version-specific TLS contents.
pub const fn params(&self) -> &[SvcParam]
pub const fn params(&self) -> &[SvcParam]
Return the record’s service parameters in numeric key order.
pub const fn is_alias_mode(&self) -> bool
pub const fn is_alias_mode(&self) -> bool
Return whether this record is in AliasMode.
pub const fn is_service_mode(&self) -> bool
pub const fn is_service_mode(&self) -> bool
Return whether this record is in ServiceMode.
pub fn param(&self, key: SvcParamKey) -> Option<&SvcParam>
pub fn param(&self, key: SvcParamKey) -> Option<&SvcParam>
Look up a parameter by numeric key.
pub fn mandatory_keys(&self) -> Option<&[SvcParamKey]>
pub fn mandatory_keys(&self) -> Option<&[SvcParamKey]>
Return the explicitly mandatory keys, if present.
pub fn alpn_protocols(&self) -> Option<&AlpnList>
pub fn alpn_protocols(&self) -> Option<&AlpnList>
Return the advertised ALPN protocol identifiers, if present.
pub fn has_no_default_alpn(&self) -> bool
pub fn has_no_default_alpn(&self) -> bool
Return whether the protocol mapping’s default ALPN set is suppressed.
pub fn ipv4_hints(&self) -> Option<&[Ipv4Addr]>
pub fn ipv4_hints(&self) -> Option<&[Ipv4Addr]>
Return the advertised IPv4 address hints, if present.
pub fn ech_config_list(&self) -> Option<&Bytes>
pub fn ech_config_list(&self) -> Option<&Bytes>
Return the framed ECHConfigList, if present.
pub fn ipv6_hints(&self) -> Option<&[Ipv6Addr]>
pub fn ipv6_hints(&self) -> Option<&[Ipv6Addr]>
Return the advertised IPv6 address hints, if present.
Trait Implementations§
§impl Clone for ServiceBinding
impl Clone for ServiceBinding
§fn clone(&self) -> ServiceBinding
fn clone(&self) -> ServiceBinding
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ServiceBinding
impl Debug for ServiceBinding
§impl Display for ServiceBinding
Formats a human-readable service-binding diagnostic.
impl Display for ServiceBinding
Formats a human-readable service-binding diagnostic.
impl Eq for ServiceBinding
§impl PartialEq for ServiceBinding
impl PartialEq for ServiceBinding
impl StructuralPartialEq for ServiceBinding
Auto Trait Implementations§
impl !Freeze for ServiceBinding
impl RefUnwindSafe for ServiceBinding
impl Send for ServiceBinding
impl Sync for ServiceBinding
impl Unpin for ServiceBinding
impl UnsafeUnpin for ServiceBinding
impl UnwindSafe for ServiceBinding
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more§impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
fn rama_try_from(value: T) -> Result<U, <U as RamaTryFrom<T>>::Error>
§impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
type Error = <U as RamaTryFrom<T, CrateMarker>>::Error
fn rama_try_into(self) -> Result<U, <U as RamaTryFrom<T, CrateMarker>>::Error>
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.