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§
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 copy 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