Struct OptionsRequest
pub struct OptionsRequest { /* private fields */ }icap and std only.Expand description
One prebuilt OPTIONS exchange.
Implementations§
§impl OptionsRequest
impl OptionsRequest
pub fn new(
connect: ConnectRequest,
request: Request,
) -> Result<OptionsRequest, OptionsRequestError>
pub fn new( connect: ConnectRequest, request: Request, ) -> Result<OptionsRequest, OptionsRequestError>
Create a discovery request from validated transport and message parts.
The cache service URI is derived from the encoded request target, so wire routing and cached capabilities cannot disagree.
The request starts in a fresh cache partition. Clone this request or
set a stable OptionsCachePartition when independently constructed
requests should share cached state.
This constructor derives the cache identity from the encoded request
target. A transport-specific configuration scheme such as icaps is
therefore unavailable here after its request target is normalized to
icap; high-level ICAP endpoints retain that configured identity.
pub fn with_cache_partition(
self,
partition: OptionsCachePartition,
) -> OptionsRequest
pub fn with_cache_partition( self, partition: OptionsCachePartition, ) -> OptionsRequest
Set the cache partition for authentication and connector policy.
pub fn set_cache_partition(
&mut self,
partition: OptionsCachePartition,
) -> &mut OptionsRequest
pub fn set_cache_partition( &mut self, partition: OptionsCachePartition, ) -> &mut OptionsRequest
Set the cache partition for authentication and connector policy.
pub const fn service_uri(&self) -> &Uri
pub const fn service_uri(&self) -> &Uri
Return the exact ICAP service URI used as the cache identity.
pub fn connect_request(&self) -> ConnectRequest
pub fn connect_request(&self) -> ConnectRequest
Return an isolated transport connection request derived from the reusable template.
Connection-local extension mutations cannot affect this OPTIONS
request or sibling attempts. OptionsService performs the same fork
internally before each connection.
Trait Implementations§
§impl Clone for OptionsRequest
impl Clone for OptionsRequest
§fn clone(&self) -> OptionsRequest
fn clone(&self) -> OptionsRequest
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 OptionsRequest
impl Debug for OptionsRequest
§impl Service<OptionsRequest> for NoOptionsDiscovery
impl Service<OptionsRequest> for NoOptionsDiscovery
§type Output = Arc<ServiceCapabilities>
type Output = Arc<ServiceCapabilities>
§async fn serve(
&self,
_input: OptionsRequest,
) -> Result<<NoOptionsDiscovery as Service<OptionsRequest>>::Output, <NoOptionsDiscovery as Service<OptionsRequest>>::Error>
async fn serve( &self, _input: OptionsRequest, ) -> Result<<NoOptionsDiscovery as Service<OptionsRequest>>::Output, <NoOptionsDiscovery as Service<OptionsRequest>>::Error>
§fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
§impl<S> Service<OptionsRequest> for OptionsCache<S>where
S: Service<OptionsRequest, Output = ServiceCapabilities>,
<S as Service<OptionsRequest>>::Error: Into<Box<dyn Error + Sync + Send>>,
impl<S> Service<OptionsRequest> for OptionsCache<S>where
S: Service<OptionsRequest, Output = ServiceCapabilities>,
<S as Service<OptionsRequest>>::Error: Into<Box<dyn Error + Sync + Send>>,
§type Output = Arc<ServiceCapabilities>
type Output = Arc<ServiceCapabilities>
§async fn serve(
&self,
input: OptionsRequest,
) -> Result<<OptionsCache<S> as Service<OptionsRequest>>::Output, <OptionsCache<S> as Service<OptionsRequest>>::Error>
async fn serve( &self, input: OptionsRequest, ) -> Result<<OptionsCache<S> as Service<OptionsRequest>>::Output, <OptionsCache<S> as Service<OptionsRequest>>::Error>
§fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
§impl<C, IO> Service<OptionsRequest> for OptionsService<C>where
C: ConnectorService<ConnectRequest, Connection = ClientConnection<IO>>,
IO: Io + Unpin + ExtensionsRef,
impl<C, IO> Service<OptionsRequest> for OptionsService<C>where
C: ConnectorService<ConnectRequest, Connection = ClientConnection<IO>>,
IO: Io + Unpin + ExtensionsRef,
§type Output = ServiceCapabilities
type Output = ServiceCapabilities
§async fn serve(
&self,
input: OptionsRequest,
) -> Result<<OptionsService<C> as Service<OptionsRequest>>::Output, <OptionsService<C> as Service<OptionsRequest>>::Error>
async fn serve( &self, input: OptionsRequest, ) -> Result<<OptionsService<C> as Service<OptionsRequest>>::Output, <OptionsService<C> as Service<OptionsRequest>>::Error>
§fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
Auto Trait Implementations§
impl !Freeze for OptionsRequest
impl RefUnwindSafe for OptionsRequest
impl Send for OptionsRequest
impl Sync for OptionsRequest
impl Unpin for OptionsRequest
impl UnsafeUnpin for OptionsRequest
impl UnwindSafe for OptionsRequest
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