pub struct GetOptions {Show 13 fields
pub end_key: Option<ByteSequence>,
pub limit: i64,
pub revision: i64,
pub sort_order: SortOrder,
pub sort_target: SortTarget,
pub serializable: bool,
pub keys_only: bool,
pub count_only: bool,
pub min_mod_revision: i64,
pub max_mod_revision: i64,
pub min_create_revision: i64,
pub max_create_revision: i64,
pub prefix: bool,
}Expand description
Options for Get operations
§Fields
end_key- Optional end key for range querieslimit- limit on number of resultsrevision- revision to read fromsort_order- sort ordersort_target- sort targetserializable- serializable readkeys_only- keys only flagcount_only- count only flagmin_mod_revision- minimum modification revisionmax_mod_revision- maximum modification revisionmin_create_revision- minimum creation revisionmax_create_revision- maximum creation revisionprefix- prefix flag
Fields§
§end_key: Option<ByteSequence>§limit: i64§revision: i64§sort_order: SortOrder§sort_target: SortTarget§serializable: bool§keys_only: bool§count_only: bool§min_mod_revision: i64§max_mod_revision: i64§min_create_revision: i64§max_create_revision: i64§prefix: boolImplementations§
Source§impl GetOptions
impl GetOptions
Sourcepub fn builder() -> GetOptionsBuilder
pub fn builder() -> GetOptionsBuilder
Creates a builder for GetOptions
§Examples
use rcfe_core::options::kv::{GetOptions, GetOptionsBuilder};
let get_options = GetOptions::builder()
.limit(10)
.serializable(true)
.build();Sourcepub fn default() -> Self
pub fn default() -> Self
Creates a default GetOptions instance
§Examples
use rcfe_core::options::kv::GetOptions;
let get_options = GetOptions::default();Sourcepub fn to_request(self, key: &ByteSequence) -> RangeRequest
pub fn to_request(self, key: &ByteSequence) -> RangeRequest
Converts GetOptions to an etcdserverpb::RangeRequest
§Arguments
key- The key to get
§Returns
etcdserverpb::RangeRequest- The corresponding RangeRequest
§Examples
use rcfe_core::options::kv::{GetOptions, ByteSequence};
let get_options = GetOptions::default();
let key = ByteSequence::from("my_key");
let range_request = get_options.to_request(&key);Trait Implementations§
Source§impl Clone for GetOptions
impl Clone for GetOptions
Source§fn clone(&self) -> GetOptions
fn clone(&self) -> GetOptions
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 moreAuto Trait Implementations§
impl Freeze for GetOptions
impl RefUnwindSafe for GetOptions
impl Send for GetOptions
impl Sync for GetOptions
impl Unpin for GetOptions
impl UnwindSafe for GetOptions
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