Struct opendal::AccessorMetadata
source · [−]pub struct AccessorMetadata { /* private fields */ }
Expand description
Metadata for accessor, users can use this metadata to get information of underlying backend.
Implementations
sourceimpl AccessorMetadata
impl AccessorMetadata
sourcepub fn set_scheme(&mut self, scheme: Scheme) -> &mut Self
pub fn set_scheme(&mut self, scheme: Scheme) -> &mut Self
Set Scheme
for backend.
sourcepub fn set_root(&mut self, root: &str) -> &mut Self
pub fn set_root(&mut self, root: &str) -> &mut Self
Set root for backend.
Note: input root must be normalized.
sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
Name of backend, could be empty if underlying backend doesn’t have namespace concept.
For example:
- name for
s3
=> bucket name - name for
azblob
=> container name
sourcepub fn can_read(&self) -> bool
pub fn can_read(&self) -> bool
Check if current backend supports Accessor::read
or not.
sourcepub fn can_write(&self) -> bool
pub fn can_write(&self) -> bool
Check if current backend supports Accessor::write
or not.
sourcepub fn can_list(&self) -> bool
pub fn can_list(&self) -> bool
Check if current backend supports Accessor::list
or not.
sourcepub fn can_presign(&self) -> bool
pub fn can_presign(&self) -> bool
Check if current backend supports Accessor::presign
or not.
sourcepub fn can_multipart(&self) -> bool
pub fn can_multipart(&self) -> bool
Check if current backend supports multipart operations or not.
sourcepub fn can_blocking(&self) -> bool
pub fn can_blocking(&self) -> bool
Check if current backend supports blocking operations or not.
sourcepub fn capabilities(&self) -> FlagSet<AccessorCapability>
pub fn capabilities(&self) -> FlagSet<AccessorCapability>
Get backend’s capabilities.
sourcepub fn set_capabilities(
&mut self,
capabilities: impl Into<FlagSet<AccessorCapability>>
) -> &mut Self
pub fn set_capabilities(
&mut self,
capabilities: impl Into<FlagSet<AccessorCapability>>
) -> &mut Self
Set capabilities for backend.
Trait Implementations
sourceimpl Clone for AccessorMetadata
impl Clone for AccessorMetadata
sourcefn clone(&self) -> AccessorMetadata
fn clone(&self) -> AccessorMetadata
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 AccessorMetadata
impl Debug for AccessorMetadata
sourceimpl Default for AccessorMetadata
impl Default for AccessorMetadata
sourcefn default() -> AccessorMetadata
fn default() -> AccessorMetadata
Returns the “default value” for a type. Read more
sourceimpl From<Metadata> for AccessorMetadata
impl From<Metadata> for AccessorMetadata
sourcefn from(m: Metadata) -> AccessorMetadata
fn from(m: Metadata) -> AccessorMetadata
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for AccessorMetadata
impl Send for AccessorMetadata
impl Sync for AccessorMetadata
impl Unpin for AccessorMetadata
impl UnwindSafe for AccessorMetadata
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