Struct opendal::layers::SubdirLayer
source · pub struct SubdirLayer { /* private fields */ }
Expand description
SubdirLayer to switch to subdir for existing operator.
Examples
use anyhow::Result;
use opendal::layers::SubdirLayer;
use opendal::services;
use opendal::Operator;
use opendal::Scheme;
let _ = Operator::from_env::<services::Fs>()
.expect("must init")
.layer(SubdirLayer::new("path/to/subdir"))
.finish();
Implementations§
source§impl SubdirLayer
impl SubdirLayer
sourcepub fn new(subdir: &str) -> SubdirLayer
pub fn new(subdir: &str) -> SubdirLayer
Create a new subdir layer.
Trait Implementations§
source§impl Clone for SubdirLayer
impl Clone for SubdirLayer
source§fn clone(&self) -> SubdirLayer
fn clone(&self) -> SubdirLayer
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 SubdirLayer
impl Debug for SubdirLayer
source§impl<A: Accessor> Layer<A> for SubdirLayer
impl<A: Accessor> Layer<A> for SubdirLayer
§type LayeredAccessor = SubdirAccessor<A>
type LayeredAccessor = SubdirAccessor<A>
The layered accessor that return by this layer.
source§fn layer(&self, inner: A) -> Self::LayeredAccessor
fn layer(&self, inner: A) -> Self::LayeredAccessor
Intercept the operations on the underlying storage.