Struct opendal::operator_futures::OperatorFuture
source · pub struct OperatorFuture<I, O, F: Future<Output = Result<O>>> { /* private fields */ }
Expand description
Implementations§
source§impl<F: Future<Output = Result<PresignedRequest>>> OperatorFuture<(OpStat, Duration), PresignedRequest, F>
impl<F: Future<Output = Result<PresignedRequest>>> OperatorFuture<(OpStat, Duration), PresignedRequest, F>
sourcepub fn override_content_disposition(self, v: &str) -> Self
pub fn override_content_disposition(self, v: &str) -> Self
Sets the content-disposition header that should be sent back by the remote read operation.
sourcepub fn override_cache_control(self, v: &str) -> Self
pub fn override_cache_control(self, v: &str) -> Self
Sets the cache-control header that should be sent back by the remote read operation.
sourcepub fn override_content_type(self, v: &str) -> Self
pub fn override_content_type(self, v: &str) -> Self
Sets the content-type header that should be sent back by the remote read operation.
sourcepub fn if_none_match(self, v: &str) -> Self
pub fn if_none_match(self, v: &str) -> Self
Set the If-None-Match of the option
source§impl<F: Future<Output = Result<PresignedRequest>>> OperatorFuture<(OpRead, Duration), PresignedRequest, F>
impl<F: Future<Output = Result<PresignedRequest>>> OperatorFuture<(OpRead, Duration), PresignedRequest, F>
sourcepub fn override_content_disposition(self, v: &str) -> Self
pub fn override_content_disposition(self, v: &str) -> Self
Sets the content-disposition header that should be sent back by the remote read operation.
sourcepub fn override_cache_control(self, v: &str) -> Self
pub fn override_cache_control(self, v: &str) -> Self
Sets the cache-control header that should be sent back by the remote read operation.
sourcepub fn override_content_type(self, v: &str) -> Self
pub fn override_content_type(self, v: &str) -> Self
Sets the content-type header that should be sent back by the remote read operation.
sourcepub fn if_none_match(self, v: &str) -> Self
pub fn if_none_match(self, v: &str) -> Self
Set the If-None-Match of the option
source§impl<F: Future<Output = Result<PresignedRequest>>> OperatorFuture<(OpWrite, Duration), PresignedRequest, F>
impl<F: Future<Output = Result<PresignedRequest>>> OperatorFuture<(OpWrite, Duration), PresignedRequest, F>
sourcepub fn content_type(self, v: &str) -> Self
pub fn content_type(self, v: &str) -> Self
Set the content type of option
sourcepub fn content_disposition(self, v: &str) -> Self
pub fn content_disposition(self, v: &str) -> Self
Set the content disposition of option
sourcepub fn cache_control(self, v: &str) -> Self
pub fn cache_control(self, v: &str) -> Self
Set the content type of option
source§impl<F: Future<Output = Result<Buffer>>> OperatorFuture<(OpRead, OpReader), Buffer, F>
impl<F: Future<Output = Result<Buffer>>> OperatorFuture<(OpRead, OpReader), Buffer, F>
sourcepub fn if_none_match(self, v: &str) -> Self
pub fn if_none_match(self, v: &str) -> Self
Set the If-None-Match for this operation.
sourcepub fn range(self, range: impl RangeBounds<u64>) -> Self
pub fn range(self, range: impl RangeBounds<u64>) -> Self
Set the range header for this operation.
sourcepub fn concurrent(self, concurrent: usize) -> Self
pub fn concurrent(self, concurrent: usize) -> Self
Set the concurrent read task amount.
source§impl<F: Future<Output = Result<Reader>>> OperatorFuture<(OpRead, OpReader), Reader, F>
impl<F: Future<Output = Result<Reader>>> OperatorFuture<(OpRead, OpReader), Reader, F>
sourcepub fn concurrent(self, concurrent: usize) -> Self
pub fn concurrent(self, concurrent: usize) -> Self
Set the concurrent read task amount.
source§impl<F: Future<Output = Result<()>>> OperatorFuture<(OpWrite, OpWriter, Buffer), (), F>
impl<F: Future<Output = Result<()>>> OperatorFuture<(OpWrite, OpWriter, Buffer), (), F>
sourcepub fn append(self, v: bool) -> Self
pub fn append(self, v: bool) -> Self
Set the append mode of op.
If the append mode is set, the data will be appended to the end of the file.
§Notes
Service could return Unsupported
if the underlying storage does not support append.
sourcepub fn chunk(self, v: usize) -> Self
pub fn chunk(self, v: usize) -> Self
Set the buffer size of op.
If buffer size is set, the data will be buffered by the underlying writer.
§NOTE
Service could have their own minimum buffer size while perform write operations like multipart uploads. So the buffer size may be larger than the given buffer size.
sourcepub fn concurrent(self, v: usize) -> Self
pub fn concurrent(self, v: usize) -> Self
Set the maximum concurrent write task amount.
sourcepub fn cache_control(self, v: &str) -> Self
pub fn cache_control(self, v: &str) -> Self
Set the content type of option
sourcepub fn content_type(self, v: &str) -> Self
pub fn content_type(self, v: &str) -> Self
Set the content type of option
sourcepub fn content_disposition(self, v: &str) -> Self
pub fn content_disposition(self, v: &str) -> Self
Set the content disposition of option
sourcepub fn if_none_match(self, s: &str) -> Self
pub fn if_none_match(self, s: &str) -> Self
Set the If-None-Match for this operation.
sourcepub fn if_not_exists(self, b: bool) -> Self
pub fn if_not_exists(self, b: bool) -> Self
Set the If-Not-Exist for this operation.
sourcepub fn user_metadata(
self,
data: impl IntoIterator<Item = (String, String)>,
) -> Self
pub fn user_metadata( self, data: impl IntoIterator<Item = (String, String)>, ) -> Self
Set the user defined metadata of the op
§Notes
we don’t need to include the user defined metadata prefix in the key every service will handle it internally
source§impl<F: Future<Output = Result<Writer>>> OperatorFuture<(OpWrite, OpWriter), Writer, F>
impl<F: Future<Output = Result<Writer>>> OperatorFuture<(OpWrite, OpWriter), Writer, F>
sourcepub fn append(self, v: bool) -> Self
pub fn append(self, v: bool) -> Self
Set the append mode of op.
If the append mode is set, the data will be appended to the end of the file.
§Notes
Service could return Unsupported
if the underlying storage does not support append.
sourcepub fn chunk(self, v: usize) -> Self
pub fn chunk(self, v: usize) -> Self
Set the chunk size of op.
If chunk size is set, the data will be chunked by the underlying writer.
§NOTE
Service could have their own limitation for chunk size. It’s possible that chunk size is not equal to the given chunk size.
For example:
- AWS S3 requires the part size to be in [5MiB, 5GiB].
- GCS requires the part size to be aligned with 256 KiB.
The services will alter the chunk size to meet their requirements.
sourcepub fn concurrent(self, v: usize) -> Self
pub fn concurrent(self, v: usize) -> Self
Set the maximum concurrent write task amount.
sourcepub fn cache_control(self, v: &str) -> Self
pub fn cache_control(self, v: &str) -> Self
Set the content type of option
sourcepub fn content_type(self, v: &str) -> Self
pub fn content_type(self, v: &str) -> Self
Set the content type of option
sourcepub fn content_disposition(self, v: &str) -> Self
pub fn content_disposition(self, v: &str) -> Self
Set the content disposition of option
sourcepub fn user_metadata(
self,
data: impl IntoIterator<Item = (String, String)>,
) -> Self
pub fn user_metadata( self, data: impl IntoIterator<Item = (String, String)>, ) -> Self
Set the user defined metadata of the op
§Notes
we don’t need to include the user defined metadata prefix in the key. every service will handle it internally
source§impl<F: Future<Output = Result<Vec<Entry>>>> OperatorFuture<OpList, Vec<Entry>, F>
impl<F: Future<Output = Result<Vec<Entry>>>> OperatorFuture<OpList, Vec<Entry>, F>
sourcepub fn limit(self, v: usize) -> Self
pub fn limit(self, v: usize) -> Self
The limit passed to underlying service to specify the max results that could return per-request.
Users could use this to control the memory usage of list operation.
sourcepub fn start_after(self, v: &str) -> Self
pub fn start_after(self, v: &str) -> Self
The start_after passes to underlying service to specify the specified key to start listing from.
sourcepub fn recursive(self, v: bool) -> Self
pub fn recursive(self, v: bool) -> Self
The recursive is used to control whether the list operation is recursive.
- If
false
, list operation will only list the entries under the given path. - If
true
, list operation will list all entries that starts with given path.
Default to false
.
sourcepub fn version(self, v: bool) -> Self
pub fn version(self, v: bool) -> Self
The version is used to control whether the object versions should be returned.
- If
false
, list operation will not return with object versions - If
true
, list operation will return with object versions if object versioning is supported by the underlying service
Default to false
source§impl<F: Future<Output = Result<Lister>>> OperatorFuture<OpList, Lister, F>
impl<F: Future<Output = Result<Lister>>> OperatorFuture<OpList, Lister, F>
sourcepub fn limit(self, v: usize) -> Self
pub fn limit(self, v: usize) -> Self
The limit passed to underlying service to specify the max results that could return per-request.
Users could use this to control the memory usage of list operation.
sourcepub fn start_after(self, v: &str) -> Self
pub fn start_after(self, v: &str) -> Self
The start_after passes to underlying service to specify the specified key to start listing from.
sourcepub fn recursive(self, v: bool) -> Self
pub fn recursive(self, v: bool) -> Self
The recursive is used to control whether the list operation is recursive.
- If
false
, list operation will only list the entries under the given path. - If
true
, list operation will list all entries that starts with given path.
Default to false
.
sourcepub fn version(self, v: bool) -> Self
pub fn version(self, v: bool) -> Self
The version is used to control whether the object versions should be returned.
- If
false
, list operation will not return with object versions - If
true
, list operation will return with object versions if object versioning is supported by the underlying service
Default to false
Trait Implementations§
source§impl<I, O, F> IntoFuture for OperatorFuture<I, O, F>
impl<I, O, F> IntoFuture for OperatorFuture<I, O, F>
§type IntoFuture = F
type IntoFuture = F
source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Auto Trait Implementations§
impl<I, O, F> Freeze for OperatorFuture<I, O, F>where
I: Freeze,
impl<I, O, F> !RefUnwindSafe for OperatorFuture<I, O, F>
impl<I, O, F> Send for OperatorFuture<I, O, F>where
I: Send,
impl<I, O, F> Sync for OperatorFuture<I, O, F>where
I: Sync,
impl<I, O, F> Unpin for OperatorFuture<I, O, F>where
I: Unpin,
impl<I, O, F> !UnwindSafe for OperatorFuture<I, O, F>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.