pub struct CallOptions { /* private fields */ }Implementations§
Source§impl CallOptions
impl CallOptions
Sourcepub fn new(timeout: Duration) -> Result<Self, ClientError>
pub fn new(timeout: Duration) -> Result<Self, ClientError>
Creates a call scope whose absolute deadline is anchored now.
Cloning these options preserves that original deadline; it never turns the supplied duration into a new per-request timeout.
Sourcepub fn from_absolute_deadline_unix_millis(
absolute_unix_millis: u64,
) -> Result<Self, ClientError>
pub fn from_absolute_deadline_unix_millis( absolute_unix_millis: u64, ) -> Result<Self, ClientError>
Creates a call scope from an existing absolute Unix-millisecond deadline. The deadline must be in the future and no more than the client maximum call budget away.
pub fn with_cancellation(self, cancellation: CallCancellation) -> Self
pub fn with_index_name(self, index_name: String) -> Result<Self, ClientError>
Sourcepub fn with_workload_class(self, workload_class: WorkloadClass) -> Self
pub fn with_workload_class(self, workload_class: WorkloadClass) -> Self
Selects a workload class for this call. The server still requires the authenticated role to grant the class and checks action compatibility.
pub const fn cancellation(&self) -> &CallCancellation
Sourcepub fn absolute_deadline_unix_millis(&self) -> Result<u64, ClientError>
pub fn absolute_deadline_unix_millis(&self) -> Result<u64, ClientError>
Returns the exact deadline placed in every request envelope in this call scope.
Sourcepub fn remaining(&self) -> Result<Duration, ClientError>
pub fn remaining(&self) -> Result<Duration, ClientError>
Returns the budget left in this call scope without resetting its absolute deadline.
Trait Implementations§
Source§impl Clone for CallOptions
impl Clone for CallOptions
Auto Trait Implementations§
impl Freeze for CallOptions
impl RefUnwindSafe for CallOptions
impl Send for CallOptions
impl Sync for CallOptions
impl Unpin for CallOptions
impl UnsafeUnpin for CallOptions
impl UnwindSafe for CallOptions
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> 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