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::Operator;
use opendal::Scheme;
let _ = Operator::from_env(Scheme::Fs)
.expect("must init")
.layer(SubdirLayer::new("path/to/subdir"));
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 more