pub struct RequestOptions { /* private fields */ }Expand description
The per-request options for a client call.
This is currently an opaque type, used only in mocking the Storage client.
It is opaque to avoid breaking changes until its interface stabilizes.
Implementations§
Source§impl RequestOptions
impl RequestOptions
Sourcepub fn set_read_resume_policy(&mut self, v: Arc<dyn ReadResumePolicy>)
pub fn set_read_resume_policy(&mut self, v: Arc<dyn ReadResumePolicy>)
Sets the read resume policy.
Sourcepub fn read_resume_policy(&self) -> Arc<dyn ReadResumePolicy>
pub fn read_resume_policy(&self) -> Arc<dyn ReadResumePolicy>
Returns the read resume policy.
Sourcepub fn set_resumable_upload_threshold(&mut self, v: usize)
pub fn set_resumable_upload_threshold(&mut self, v: usize)
Sets the threshold for resumable uploads.
Sourcepub fn resumable_upload_threshold(&self) -> usize
pub fn resumable_upload_threshold(&self) -> usize
Returns the threshold for resumable uploads.
Sourcepub fn set_resumable_upload_buffer_size(&mut self, v: usize)
pub fn set_resumable_upload_buffer_size(&mut self, v: usize)
Sets the buffer size for resumable uploads.
Sourcepub fn set_bidi_attempt_timeout(&mut self, v: Duration)
pub fn set_bidi_attempt_timeout(&mut self, v: Duration)
Sets the timeout for bidirectional streaming attempts.
Sourcepub fn resumable_upload_buffer_size(&self) -> usize
pub fn resumable_upload_buffer_size(&self) -> usize
Returns the buffer size for resumable uploads.
Sourcepub fn with_user_agent(&mut self, v: impl Into<String>)
pub fn with_user_agent(&mut self, v: impl Into<String>)
Appends a user agent string to the request.
Sourcepub fn set_quota_project(&mut self, v: impl Into<String>)
pub fn set_quota_project(&mut self, v: impl Into<String>)
Sets the project that will be billed for this request.
Trait Implementations§
Source§impl Clone for RequestOptions
impl Clone for RequestOptions
Source§fn clone(&self) -> RequestOptions
fn clone(&self) -> RequestOptions
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for RequestOptions
impl !RefUnwindSafe for RequestOptions
impl Send for RequestOptions
impl Sync for RequestOptions
impl Unpin for RequestOptions
impl UnsafeUnpin for RequestOptions
impl !UnwindSafe for RequestOptions
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Wrap the input message
T in a tonic::Request