pub enum ProviderRequest<Req, Res> {
Get(Req),
Insert(Req, Res),
}Expand description
Requests sent to the cache provider
Variants§
Get(Req)
Check if the provider has a similar request
Insert(Req, Res)
Insert a response into the provider
Trait Implementations§
Source§impl<Req: Clone, Res: Clone> Clone for ProviderRequest<Req, Res>
impl<Req: Clone, Res: Clone> Clone for ProviderRequest<Req, Res>
Source§fn clone(&self) -> ProviderRequest<Req, Res>
fn clone(&self) -> ProviderRequest<Req, Res>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a, K, V> Service<ProviderRequest<K, V>> for LruProvider<'a, K, V>
Available on crate feature lru only.
impl<'a, K, V> Service<ProviderRequest<K, V>> for LruProvider<'a, K, V>
Available on crate feature
lru only.Source§type Response = ProviderResponse<V>
type Response = ProviderResponse<V>
Responses given by the service.
Source§type Error = Infallible
type Error = Infallible
Errors produced by the service.
Source§type Future = Pin<Box<dyn Future<Output = Result<ProviderResponse<V>, Infallible>> + Send + 'a>>
type Future = Pin<Box<dyn Future<Output = Result<ProviderResponse<V>, Infallible>> + Send + 'a>>
The future response value.
Auto Trait Implementations§
impl<Req, Res> Freeze for ProviderRequest<Req, Res>
impl<Req, Res> RefUnwindSafe for ProviderRequest<Req, Res>where
Req: RefUnwindSafe,
Res: RefUnwindSafe,
impl<Req, Res> Send for ProviderRequest<Req, Res>
impl<Req, Res> Sync for ProviderRequest<Req, Res>
impl<Req, Res> Unpin for ProviderRequest<Req, Res>
impl<Req, Res> UnwindSafe for ProviderRequest<Req, Res>where
Req: UnwindSafe,
Res: UnwindSafe,
Blanket Implementations§
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