Struct opendal::Capability

source ·
pub struct Capability {
Show 37 fields pub stat: bool, pub stat_with_if_match: bool, pub stat_with_if_none_match: bool, pub read: bool, pub read_can_seek: bool, pub read_can_next: bool, pub read_with_range: bool, pub read_with_if_match: bool, pub read_with_if_none_match: bool, pub read_with_override_cache_control: bool, pub read_with_override_content_disposition: bool, pub write: bool, pub write_without_content_length: bool, pub write_with_content_type: bool, pub write_with_content_disposition: bool, pub write_with_cache_control: bool, pub append: bool, pub append_with_content_type: bool, pub append_with_content_disposition: bool, pub append_with_cache_control: bool, pub create_dir: bool, pub delete: bool, pub copy: bool, pub rename: bool, pub list: bool, pub list_with_limit: bool, pub list_with_start_after: bool, pub list_with_delimiter_slash: bool, pub list_without_delimiter: bool, pub presign: bool, pub presign_read: bool, pub presign_stat: bool, pub presign_write: bool, pub batch: bool, pub batch_delete: bool, pub batch_max_operations: Option<usize>, pub blocking: bool,
}
Expand description

Capability is used to describe what operations are supported by current Operator.

Via capability, we can know:

  • Whether current Operator supports read or not.
  • Whether current Operator supports read with if match or not.
  • What’s current Operator max supports batch operations count.

Add fields of Capabilities with be public and can be accessed directly.

Notes

Capabilities reflects the native support for operations. It’s possible that some operations are not supported by current Operator, but still can be used.

For examples, we will support seek and next for all readers returned by services.

Naming Style

  • Operation itself should be in lower case, like read, write.
  • Operation with sub operations should be named like presign_read.
  • Operation with variants should be named like read_can_seek.
  • Operation with arguments should be named like read_with_range.
  • Operation with limitations should be named like batch_max_operations.

Fields§

§stat: bool

If operator supports stat natively, it will be true.

§stat_with_if_match: bool

If operator supports stat with if match natively, it will be true.

§stat_with_if_none_match: bool

If operator supports stat with if none match natively, it will be true.

§read: bool

If operator supports read natively, it will be true.

§read_can_seek: bool

If operator supports seek on returning reader natively, it will be true.

§read_can_next: bool

If operator supports next on returning reader natively, it will be true.

§read_with_range: bool

If operator supports read with range natively, it will be true.

§read_with_if_match: bool

If operator supports read with if match natively, it will be true.

§read_with_if_none_match: bool

If operator supports read with if none match natively, it will be true.

§read_with_override_cache_control: bool

if operator supports read with override cache control natively, it will be true.

§read_with_override_content_disposition: bool

if operator supports read with override content disposition natively, it will be true.

§write: bool

If operator supports write natively, it will be true.

§write_without_content_length: bool

If operator supports write with without content length, it will be true.

This feature also be called as Unsized write or streaming write.

§write_with_content_type: bool

If operator supports write with content type natively, it will be true.

§write_with_content_disposition: bool

If operator supports write with content disposition natively, it will be true.

§write_with_cache_control: bool

If operator supports write with cache control natively, it will be true.

§append: bool

If operator supports append natively, it will be true.

§append_with_content_type: bool

If operator supports append with content type natively, it will be true.

§append_with_content_disposition: bool

If operator supports append with content disposition natively, it will be true.

§append_with_cache_control: bool

If operator supports append with cache control natively, it will be true.

§create_dir: bool

If operator supports create dir natively, it will be true.

§delete: bool

If operator supports delete natively, it will be true.

§copy: bool

If operator supports copy natively, it will be true.

§rename: bool

If operator supports rename natively, it will be true.

§list: bool

If operator supports list natively, it will be true.

§list_with_limit: bool

If backend supports list with limit, it will be true.

§list_with_start_after: bool

If backend supports list with start after, it will be true.

§list_with_delimiter_slash: bool

If backend support list with using slash as delimiter.

§list_without_delimiter: bool

If backend supports list without delimiter.

§presign: bool

If operator supports presign natively, it will be true.

§presign_read: bool

If operator supports presign read natively, it will be true.

§presign_stat: bool

If operator supports presign stat natively, it will be true.

§presign_write: bool

If operator supports presign write natively, it will be true.

§batch: bool

If operator supports batch natively, it will be true.

§batch_delete: bool

If operator supports batch delete natively, it will be true.

§batch_max_operations: Option<usize>

The max operations that operator supports in batch.

§blocking: bool

If operator supports blocking natively, it will be true.

Trait Implementations§

source§

impl Clone for Capability

source§

fn clone(&self) -> Capability

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Capability

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Capability

source§

fn default() -> Capability

Returns the “default value” for a type. Read more
source§

impl Copy for Capability

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CompatExt for T

source§

fn compat(self) -> Compat<T>

Applies the Compat adapter by value. Read more
source§

fn compat_ref(&self) -> Compat<&T>

Applies the Compat adapter by shared reference. Read more
source§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the Compat adapter by mutable reference. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more