pub struct Put {
pub key: String,
pub value: Vec<u8>,
pub ttl_ms: Option<u64>,
pub priority: i32,
pub write_concern: Option<Vec<u8>>,
}Fields§
§key: String§value: Vec<u8>§ttl_ms: Option<u64>§priority: i32§write_concern: Option<Vec<u8>>Implementations§
Source§impl Put
impl Put
Sourcepub fn ttl_ms(&self) -> u64
pub fn ttl_ms(&self) -> u64
Returns the value of ttl_ms, or the default value if ttl_ms is unset.
Sourcepub fn priority(&self) -> Priority
pub fn priority(&self) -> Priority
Returns the enum value of priority, or the default if the field is set to an invalid enum value.
Sourcepub fn set_priority(&mut self, value: Priority)
pub fn set_priority(&mut self, value: Priority)
Sets priority to the provided enum value.
Sourcepub fn write_concern(&self) -> &[u8] ⓘ
pub fn write_concern(&self) -> &[u8] ⓘ
Returns the value of write_concern, or the default value if write_concern is unset.
Trait Implementations§
impl Eq for Put
Source§impl Message for Put
impl Message for Put
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.impl StructuralPartialEq for Put
Auto Trait Implementations§
impl Freeze for Put
impl RefUnwindSafe for Put
impl Send for Put
impl Sync for Put
impl Unpin for Put
impl UnsafeUnpin for Put
impl UnwindSafe for Put
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