Struct ServiceEndpoint
pub struct ServiceEndpoint { /* private fields */ }http and icap only.Expand description
Configuration for one ICAP adaptation service URI.
Implementations§
§impl ServiceEndpoint
impl ServiceEndpoint
pub fn new(
uri: impl IntoUriInput,
) -> Result<ServiceEndpoint, ServiceEndpointError>
pub fn new( uri: impl IntoUriInput, ) -> Result<ServiceEndpoint, ServiceEndpointError>
Parse an absolute ICAP service URI and derive its connector target.
Return the ICAP server transport target.
pub fn headers_mut(&mut self) -> &mut HeaderMap
pub fn headers_mut(&mut self) -> &mut HeaderMap
Return mutable additional ICAP request headers.
Taking mutable access isolates subsequent OPTIONS cache entries from cloned endpoint configurations.
pub fn with_options_cache_partition(
self,
partition: OptionsCachePartition,
) -> ServiceEndpoint
pub fn with_options_cache_partition( self, partition: OptionsCachePartition, ) -> ServiceEndpoint
Set the explicit OPTIONS cache identity for this endpoint.
Use distinct partitions when the same URI can return different capabilities for different credentials or connector policy.
pub fn set_options_cache_partition(
&mut self,
partition: OptionsCachePartition,
) -> &mut ServiceEndpoint
pub fn set_options_cache_partition( &mut self, partition: OptionsCachePartition, ) -> &mut ServiceEndpoint
Set the explicit OPTIONS cache identity for this endpoint.
Use distinct partitions when the same URI can return different capabilities for different credentials or connector policy.
pub const fn options_cache_partition(&self) -> &OptionsCachePartition
pub const fn options_cache_partition(&self) -> &OptionsCachePartition
Return the OPTIONS cache identity for this endpoint.
pub fn connection_extension<T>(&self) -> Option<&T>where
T: Extension,
pub fn connection_extension<T>(&self) -> Option<&T>where
T: Extension,
Return the latest connection extension of type T.
pub fn insert_connection_extension<T>(&mut self, value: T) -> &Twhere
T: Extension,
pub fn insert_connection_extension<T>(&mut self, value: T) -> &Twhere
T: Extension,
Insert a connection extension applied to later ICAP connections.
Inserting isolates later OPTIONS discovery from clones of the previous endpoint configuration.
pub fn insert_connection_extension_arc<T>(&mut self, value: Arc<T>) -> Arc<T> ⓘwhere
T: Extension,
pub fn insert_connection_extension_arc<T>(&mut self, value: Arc<T>) -> Arc<T> ⓘwhere
T: Extension,
Insert a shared connection extension.
Inserting isolates later OPTIONS discovery from clones of the previous endpoint configuration.
pub fn maybe_with_preview(self, preview: Option<Preview>) -> ServiceEndpoint
pub fn maybe_with_preview(self, preview: Option<Preview>) -> ServiceEndpoint
Set the Preview limit used for entity-bearing messages.
pub fn maybe_set_preview(
&mut self,
preview: Option<Preview>,
) -> &mut ServiceEndpoint
pub fn maybe_set_preview( &mut self, preview: Option<Preview>, ) -> &mut ServiceEndpoint
Set the Preview limit used for entity-bearing messages.
pub fn with_preview(self, preview: Preview) -> ServiceEndpoint
pub fn with_preview(self, preview: Preview) -> ServiceEndpoint
Set the Preview limit used for entity-bearing messages.
pub fn set_preview(&mut self, preview: Preview) -> &mut ServiceEndpoint
pub fn set_preview(&mut self, preview: Preview) -> &mut ServiceEndpoint
Set the Preview limit used for entity-bearing messages.
pub fn without_preview(self) -> ServiceEndpoint
pub fn without_preview(self) -> ServiceEndpoint
Set the Preview limit used for entity-bearing messages.
pub fn unset_preview(&mut self) -> &mut ServiceEndpoint
pub fn unset_preview(&mut self) -> &mut ServiceEndpoint
Set the Preview limit used for entity-bearing messages.
pub fn with_allow_204(self, allow: bool) -> ServiceEndpoint
pub fn with_allow_204(self, allow: bool) -> ServiceEndpoint
Set whether to advertise support for 204 outside Preview.
This requires retaining the complete original entity stream until the ICAP decision, so prefer Preview for large or unbounded bodies.
pub fn set_allow_204(&mut self, allow: bool) -> &mut ServiceEndpoint
pub fn set_allow_204(&mut self, allow: bool) -> &mut ServiceEndpoint
Set whether to advertise support for 204 outside Preview.
This requires retaining the complete original entity stream until the ICAP decision, so prefer Preview for large or unbounded bodies.
pub const fn allows_204(&self) -> bool
pub const fn allows_204(&self) -> bool
Return whether 204 is advertised outside Preview.
pub fn with_allow_206(self, allow: bool) -> ServiceEndpoint
pub fn with_allow_206(self, allow: bool) -> ServiceEndpoint
Set whether to advertise support for the 206 extension.
Without OPTIONS discovery, enabling this is an explicit out-of-band trust decision. The partial-content draft recommends advertising 206 only after the service confirms it through OPTIONS.
pub fn set_allow_206(&mut self, allow: bool) -> &mut ServiceEndpoint
pub fn set_allow_206(&mut self, allow: bool) -> &mut ServiceEndpoint
Set whether to advertise support for the 206 extension.
Without OPTIONS discovery, enabling this is an explicit out-of-band trust decision. The partial-content draft recommends advertising 206 only after the service confirms it through OPTIONS.
pub const fn allows_206(&self) -> bool
pub const fn allows_206(&self) -> bool
Return whether the 206 extension is advertised.
pub fn with_allow_icap_trailers(self, allow: bool) -> ServiceEndpoint
pub fn with_allow_icap_trailers(self, allow: bool) -> ServiceEndpoint
Set whether requests offer negotiated outer ICAP response trailers.
The HTTP adaptation layer consumes these fields as ICAP metadata
and never exposes them as HTTP trailers. The default is false.
pub fn set_allow_icap_trailers(&mut self, allow: bool) -> &mut ServiceEndpoint
pub fn set_allow_icap_trailers(&mut self, allow: bool) -> &mut ServiceEndpoint
Set whether requests offer negotiated outer ICAP response trailers.
The HTTP adaptation layer consumes these fields as ICAP metadata
and never exposes them as HTTP trailers. The default is false.
pub const fn allows_icap_trailers(&self) -> bool
pub const fn allows_icap_trailers(&self) -> bool
Return whether outer ICAP response trailers are offered.
pub const fn with_replay_limits(self, limits: ReplayLimits) -> ServiceEndpoint
pub const fn with_replay_limits(self, limits: ReplayLimits) -> ServiceEndpoint
Set the in-memory bounds for original HTTP replay frames.
pub fn set_replay_limits(
&mut self,
limits: ReplayLimits,
) -> &mut ServiceEndpoint
pub fn set_replay_limits( &mut self, limits: ReplayLimits, ) -> &mut ServiceEndpoint
Set the in-memory bounds for original HTTP replay frames.
pub const fn replay_limits(&self) -> ReplayLimits
pub const fn replay_limits(&self) -> ReplayLimits
Return the original HTTP replay bounds.
pub fn options_request(
&self,
) -> Result<OptionsRequest, ServiceEndpointRequestError>
pub fn options_request( &self, ) -> Result<OptionsRequest, ServiceEndpointRequestError>
Build a standalone capability-discovery request for this service.
Trait Implementations§
§impl Clone for ServiceEndpoint
impl Clone for ServiceEndpoint
§fn clone(&self) -> ServiceEndpoint
fn clone(&self) -> ServiceEndpoint
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !Freeze for ServiceEndpoint
impl RefUnwindSafe for ServiceEndpoint
impl Send for ServiceEndpoint
impl Sync for ServiceEndpoint
impl Unpin for ServiceEndpoint
impl UnsafeUnpin for ServiceEndpoint
impl UnwindSafe for ServiceEndpoint
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