Struct ServiceCapabilities
pub struct ServiceCapabilities { /* private fields */ }icap and std only.Expand description
Immutable capabilities discovered with one successful OPTIONS exchange.
Implementations§
§impl ServiceCapabilities
impl ServiceCapabilities
pub fn from_options_response(
response: Response,
opt_body: Option<Bytes>,
max_headers: usize,
allow_206_offered: bool,
validation: OptionsValidation,
) -> Result<ServiceCapabilities, CapabilitiesError>
pub fn from_options_response( response: Response, opt_body: Option<Bytes>, max_headers: usize, allow_206_offered: bool, validation: OptionsValidation, ) -> Result<ServiceCapabilities, CapabilitiesError>
Parse a completed OPTIONS response into a capability snapshot.
max_headers bounds temporary header slots. allow_206_offered must
reflect the corresponding OPTIONS request; an unsolicited response
token is retained in the raw response but does not negotiate 206.
pub const fn methods(&self) -> &SupportedMethods
pub const fn methods(&self) -> &SupportedMethods
Return parsed method support.
pub const fn service_tag(&self) -> Option<&Bytes>
pub const fn service_tag(&self) -> Option<&Bytes>
Return the service generation tag, including its wire quoting.
pub const fn service_id(&self) -> Option<&Bytes>
pub const fn service_id(&self) -> Option<&Bytes>
Return the opaque service identifier.
pub const fn preview(&self) -> Option<Preview>
pub const fn preview(&self) -> Option<Preview>
Return the maximum Preview size advertised by the service.
pub fn allows_204(&self) -> bool
pub fn allows_204(&self) -> bool
Return whether the service advertises 204 support.
pub const fn allows_206(&self) -> bool
pub const fn allows_206(&self) -> bool
Return whether the service negotiated 206 support.
A response token alone is insufficient: this is true only when the corresponding OPTIONS request offered the extension.
pub const fn allowed_features(&self) -> &AllowedFeatures
pub const fn allowed_features(&self) -> &AllowedFeatures
Return every valid feature token advertised in Allow.
pub fn allows_icap_trailers(&self) -> bool
pub fn allows_icap_trailers(&self) -> bool
Return whether the service advertises negotiated outer ICAP trailers.
pub const fn transfer_rules(&self) -> &TransferRules
pub const fn transfer_rules(&self) -> &TransferRules
Return deterministic transfer selection rules.
pub const fn options_ttl(&self) -> Option<Duration>
pub const fn options_ttl(&self) -> Option<Duration>
Return the valid peer-supplied OPTIONS lifetime.
None means the RFC’s non-expiring default or an invalid field. Cache
policy distinguishes those cases internally and never treats an
invalid value as non-expiring.
pub const fn max_connections(&self) -> Option<u64>
pub const fn max_connections(&self) -> Option<u64>
Return the advertised connection limit.
pub const fn opt_body_type(&self) -> Option<&Bytes>
pub const fn opt_body_type(&self) -> Option<&Bytes>
Return the declared type of the optional OPTIONS body.
Trait Implementations§
§impl Clone for ServiceCapabilities
impl Clone for ServiceCapabilities
§fn clone(&self) -> ServiceCapabilities
fn clone(&self) -> ServiceCapabilities
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 ServiceCapabilities
impl Debug for ServiceCapabilities
impl Extension for ServiceCapabilities
Auto Trait Implementations§
impl !Freeze for ServiceCapabilities
impl RefUnwindSafe for ServiceCapabilities
impl Send for ServiceCapabilities
impl Sync for ServiceCapabilities
impl Unpin for ServiceCapabilities
impl UnsafeUnpin for ServiceCapabilities
impl UnwindSafe for ServiceCapabilities
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<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