Struct OptionsRequest
pub struct OptionsRequest { /* private fields */ }Available on crate features
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.
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 const fn connect_request(&self) -> &ConnectRequest
pub const fn connect_request(&self) -> &ConnectRequest
Return the transport connection request template.
A discovery provider must fork this template for each connection
attempt. OptionsService does so automatically.
Trait Implementations§
§impl Clone for OptionsRequest
impl Clone for OptionsRequest
§fn clone(&self) -> OptionsRequest
fn clone(&self) -> OptionsRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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>
The type of the output returned by the service.
§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>
Serve an output or an error for the given input
§fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
Box this service to allow for dynamic dispatch.
§impl<S> Service<OptionsRequest> for OptionsCache<S>where
S: Service<OptionsRequest, Output = ServiceCapabilities>,
<S as Service<OptionsRequest>>::Error: Into<Box<dyn Error + Send + Sync>>,
impl<S> Service<OptionsRequest> for OptionsCache<S>where
S: Service<OptionsRequest, Output = ServiceCapabilities>,
<S as Service<OptionsRequest>>::Error: Into<Box<dyn Error + Send + Sync>>,
§type Output = Arc<ServiceCapabilities>
type Output = Arc<ServiceCapabilities>
The type of the output returned by the service.
§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>
Serve an output or an error for the given input
§fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
Box this service to allow for dynamic dispatch.
§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
The type of the output returned by the service.
§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>
Serve an output or an error for the given input
§fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
Box this service to allow for dynamic dispatch.
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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>
Wrap the input message
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>
Create a new
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more