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
sourceimpl SubdirLayer
impl SubdirLayer
sourcepub fn new(subdir: &str) -> SubdirLayer
pub fn new(subdir: &str) -> SubdirLayer
Create a new subdir layer.
Trait Implementations
sourceimpl Clone for SubdirLayer
impl Clone for SubdirLayer
sourcefn clone(&self) -> SubdirLayer
fn clone(&self) -> SubdirLayer
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for SubdirLayer
impl Debug for SubdirLayer
Auto Trait Implementations
impl RefUnwindSafe for SubdirLayer
impl Send for SubdirLayer
impl Sync for SubdirLayer
impl Unpin for SubdirLayer
impl UnwindSafe for SubdirLayer
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