Struct opendal::layers::ImmutableIndexLayer
source · pub struct ImmutableIndexLayer { /* private fields */ }
Expand description
ImmutableIndexLayer is used to add an immutable in-memory index for underlying storage services.
Especially useful for services without list capability like HTTP.
Examples
use opendal::layers::ImmutableIndexLayer;
use opendal::Operator;
use opendal::Scheme;
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_env(Scheme::Http).unwrap().layer(iil);
Implementations
sourceimpl 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
sourceimpl Clone for ImmutableIndexLayer
impl Clone for ImmutableIndexLayer
sourcefn clone(&self) -> ImmutableIndexLayer
fn clone(&self) -> ImmutableIndexLayer
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ImmutableIndexLayer
impl Debug for ImmutableIndexLayer
sourceimpl Default for ImmutableIndexLayer
impl Default for ImmutableIndexLayer
sourcefn default() -> ImmutableIndexLayer
fn default() -> ImmutableIndexLayer
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for ImmutableIndexLayer
impl Send for ImmutableIndexLayer
impl Sync for ImmutableIndexLayer
impl Unpin for ImmutableIndexLayer
impl UnwindSafe for ImmutableIndexLayer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more