Struct grpcio::CallOption
source · [−]pub struct CallOption { /* private fields */ }
Expand description
Options for calls made by client.
Implementations
sourceimpl CallOption
impl CallOption
sourcepub fn idempotent(self, is_idempotent: bool) -> CallOption
pub fn idempotent(self, is_idempotent: bool) -> CallOption
Signal that the call is idempotent.
sourcepub fn wait_for_ready(self, wait_for_ready: bool) -> CallOption
pub fn wait_for_ready(self, wait_for_ready: bool) -> CallOption
Signal that the call should not return UNAVAILABLE before it has started.
sourcepub fn cacheable(self, cacheable: bool) -> CallOption
pub fn cacheable(self, cacheable: bool) -> CallOption
Signal that the call is cacheable. gRPC is free to use GET verb.
sourcepub fn write_flags(self, write_flags: WriteFlags) -> CallOption
pub fn write_flags(self, write_flags: WriteFlags) -> CallOption
Set write flags.
sourcepub fn timeout(self, timeout: Duration) -> CallOption
pub fn timeout(self, timeout: Duration) -> CallOption
Set a timeout.
sourcepub fn get_timeout(&self) -> Option<Duration>
pub fn get_timeout(&self) -> Option<Duration>
Get the timeout.
sourcepub fn headers(self, meta: Metadata) -> CallOption
pub fn headers(self, meta: Metadata) -> CallOption
Set the headers to be sent with the call.
sourcepub fn get_headers(&self) -> Option<&Metadata>
pub fn get_headers(&self) -> Option<&Metadata>
Get headers to be sent with the call.
Trait Implementations
sourceimpl Clone for CallOption
impl Clone for CallOption
sourcefn clone(&self) -> CallOption
fn clone(&self) -> CallOption
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Default for CallOption
impl Default for CallOption
sourcefn default() -> CallOption
fn default() -> CallOption
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for CallOption
impl Send for CallOption
impl Sync for CallOption
impl Unpin for CallOption
impl UnwindSafe for CallOption
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more