pub struct DeleteOptions {
pub prefix: bool,
pub prev_kv: bool,
}Expand description
Fields§
§prefix: boolA key is treated as a prefix
prev_kv: boolReturn the previous key-value pair before deletion
Implementations§
Source§impl DeleteOptions
impl DeleteOptions
Sourcepub fn builder() -> DeleteOptionsBuilder
pub fn builder() -> DeleteOptionsBuilder
Creates a builder for DeleteOptions
§Examples
use rcfe_core::options::kv::{DeleteOptions, DeleteOptionsBuilder};
let delete_options = DeleteOptions::builder()
.prefix(true)
.prev_kv(true)
.build();Sourcepub fn to_request(&self, key: &ByteSequence) -> DeleteRangeRequest
pub fn to_request(&self, key: &ByteSequence) -> DeleteRangeRequest
Converts DeleteOptions to an etcdserverpb::DeleteRangeRequest
§Examples
use rcfe_core::options::kv::DeleteOptions;
use rcfe_core::ByteSequence;
use rcfe_core::etcdserverpb::DeleteRangeRequest;
let delete_options = DeleteOptions::builder()
.prefix(true)
.prev_kv(true)
.build();
let key = ByteSequence::from("my_key");
let request: DeleteRangeRequest = delete_options.to_request(key);Trait Implementations§
Source§impl Clone for DeleteOptions
impl Clone for DeleteOptions
Source§fn clone(&self) -> DeleteOptions
fn clone(&self) -> DeleteOptions
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 moreSource§impl Debug for DeleteOptions
impl Debug for DeleteOptions
Source§impl Default for DeleteOptions
impl Default for DeleteOptions
Source§fn default() -> DeleteOptions
fn default() -> DeleteOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DeleteOptions
impl RefUnwindSafe for DeleteOptions
impl Send for DeleteOptions
impl Sync for DeleteOptions
impl Unpin for DeleteOptions
impl UnwindSafe for DeleteOptions
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