pub struct PutRequest { /* private fields */ }
Implementations§
Source§impl PutRequest
impl PutRequest
Sourcepub fn new<K, V>(key: K, value: V) -> Self
pub fn new<K, V>(key: K, value: V) -> Self
Creates a new PutRequest for saving the specified key-value.
Sourcepub fn lease(self, lease: LeaseId) -> Self
pub fn lease(self, lease: LeaseId) -> Self
Sets the lease ID to associate with the key in the key-value store. A lease value of 0 indicates no lease.
Sourcepub fn prev_kv(self, prev_kv: bool) -> Self
pub fn prev_kv(self, prev_kv: bool) -> Self
When set, responds with the key-value pair data before the update from this Put request.
Sourcepub fn ignore_value(self) -> Self
pub fn ignore_value(self) -> Self
When set, update the key without changing its current value. Returns an error if the key does not exist.
Sourcepub fn ignore_lease(self) -> Self
pub fn ignore_lease(self) -> Self
When set, update the key without changing its current lease. Returns an error if the key does not exist.
Trait Implementations§
Source§impl Debug for PutRequest
impl Debug for PutRequest
Source§impl<K, V> From<(K, V)> for PutRequest
impl<K, V> From<(K, V)> for PutRequest
Source§impl From<PutRequest> for TxnOp
impl From<PutRequest> for TxnOp
Source§fn from(req: PutRequest) -> Self
fn from(req: PutRequest) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PutRequest
impl RefUnwindSafe for PutRequest
impl Send for PutRequest
impl Sync for PutRequest
impl Unpin for PutRequest
impl UnwindSafe for PutRequest
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> 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