pub struct ImmutableIndexLayer { /* private fields */ }
Expand description
Add an immutable in-memory index for underlying storage services.
Especially useful for services without list capability like HTTP.
§Examples
let mut iil = ImmutableIndexLayer::default();
for i in ["file", "dir/", "dir/file", "dir_without_prefix/file"] {
iil.insert(i.to_string())
}
let op = Operator::from_iter::<services::Memory>(HashMap::<_, _>::default())?
.layer(iil)
.finish();
Ok(())
Implementations§
Source§impl ImmutableIndexLayer
impl ImmutableIndexLayer
Sourcepub fn extend_iter<I>(&mut self, iter: I)where
I: IntoIterator<Item = String>,
pub fn extend_iter<I>(&mut self, iter: I)where
I: IntoIterator<Item = String>,
Insert keys from iter.
Trait Implementations§
Source§impl Clone for ImmutableIndexLayer
impl Clone for ImmutableIndexLayer
Source§fn clone(&self) -> ImmutableIndexLayer
fn clone(&self) -> ImmutableIndexLayer
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 Debug for ImmutableIndexLayer
impl Debug for ImmutableIndexLayer
Source§impl Default for ImmutableIndexLayer
impl Default for ImmutableIndexLayer
Source§fn default() -> ImmutableIndexLayer
fn default() -> ImmutableIndexLayer
Returns the “default value” for a type. Read more
Source§impl<A: Access> Layer<A> for ImmutableIndexLayer
impl<A: Access> Layer<A> for ImmutableIndexLayer
Source§type LayeredAccess = ImmutableIndexAccessor<A>
type LayeredAccess = ImmutableIndexAccessor<A>
The layered accessor that returned by this layer.
Source§fn layer(&self, inner: A) -> Self::LayeredAccess
fn layer(&self, inner: A) -> Self::LayeredAccess
Intercept the operations on the underlying storage.
Auto Trait Implementations§
impl Freeze for ImmutableIndexLayer
impl RefUnwindSafe for ImmutableIndexLayer
impl Send for ImmutableIndexLayer
impl Sync for ImmutableIndexLayer
impl Unpin for ImmutableIndexLayer
impl UnwindSafe for ImmutableIndexLayer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
Source§fn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
Decompress response bodies. Read more
Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more