pub struct RangeRequest {Show 13 fields
pub key: Vec<u8>,
pub range_end: Vec<u8>,
pub limit: i64,
pub revision: i64,
pub sort_order: i32,
pub sort_target: i32,
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,
}Fields§
§key: Vec<u8>key is the first key for the range. If range_end is not given, the request only looks up key.
range_end: Vec<u8>range_end is the upper bound on the requested range [key, range_end). If range_end is ‘\0’, the range is all keys >= key. If range_end is key plus one (e.g., “aa”+1 == “ab”, “a\xff”+1 == “b”), then the range request gets all keys prefixed with key. If both key and range_end are ‘\0’, then the range request returns all keys.
limit: i64limit is a limit on the number of keys returned for the request. When limit is set to 0, it is treated as no limit.
revision: i64revision is the point-in-time of the key-value store to use for the range. If revision is less or equal to zero, the range is over the newest key-value store. If the revision has been compacted, ErrCompacted is returned as a response.
sort_order: i32sort_order is the order for returned sorted results.
sort_target: i32sort_target is the key-value field to use for sorting.
serializable: boolserializable sets the range request to use serializable member-local reads. Range requests are linearizable by default; linearizable requests have higher latency and lower throughput than serializable requests but reflect the current consensus of the cluster. For better performance, in exchange for possible stale reads, a serializable range request is served locally without needing to reach consensus with other nodes in the cluster.
keys_only: boolkeys_only when set returns only the keys and not the values.
count_only: boolcount_only when set returns only the count of the keys in the range.
min_mod_revision: i64min_mod_revision is the lower bound for returned key mod revisions; all keys with lesser mod revisions will be filtered away.
max_mod_revision: i64max_mod_revision is the upper bound for returned key mod revisions; all keys with greater mod revisions will be filtered away.
min_create_revision: i64min_create_revision is the lower bound for returned key create revisions; all keys with lesser create trevisions will be filtered away.
max_create_revision: i64max_create_revision is the upper bound for returned key create revisions; all keys with greater create revisions will be filtered away.
Implementations§
Source§impl RangeRequest
impl RangeRequest
Sourcepub fn sort_order(&self) -> SortOrder
pub fn sort_order(&self) -> SortOrder
Returns the enum value of sort_order, or the default if the field is set to an invalid enum value.
Sourcepub fn set_sort_order(&mut self, value: SortOrder)
pub fn set_sort_order(&mut self, value: SortOrder)
Sets sort_order to the provided enum value.
Sourcepub fn sort_target(&self) -> SortTarget
pub fn sort_target(&self) -> SortTarget
Returns the enum value of sort_target, or the default if the field is set to an invalid enum value.
Sourcepub fn set_sort_target(&mut self, value: SortTarget)
pub fn set_sort_target(&mut self, value: SortTarget)
Sets sort_target to the provided enum value.
Trait Implementations§
Source§impl Clone for RangeRequest
impl Clone for RangeRequest
Source§fn clone(&self) -> RangeRequest
fn clone(&self) -> RangeRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RangeRequest
impl Debug for RangeRequest
Source§impl Default for RangeRequest
impl Default for RangeRequest
Source§impl Hash for RangeRequest
impl Hash for RangeRequest
Source§impl Message for RangeRequest
impl Message for RangeRequest
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
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,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
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,
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,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
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,
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,
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,
self.Source§impl PartialEq for RangeRequest
impl PartialEq for RangeRequest
impl Eq for RangeRequest
impl StructuralPartialEq for RangeRequest
Auto Trait Implementations§
impl Freeze for RangeRequest
impl RefUnwindSafe for RangeRequest
impl Send for RangeRequest
impl Sync for RangeRequest
impl Unpin for RangeRequest
impl UnwindSafe for RangeRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
T in a tonic::Request