Struct etcd_client::GetOptions
source · [−]pub struct GetOptions { /* private fields */ }Expand description
Options for Get operation.
Implementations
sourceimpl GetOptions
impl GetOptions
sourcepub fn with_range(self, end_key: impl Into<Vec<u8>>) -> Self
pub fn with_range(self, end_key: impl Into<Vec<u8>>) -> Self
Specifies the range of ‘Get’.
Returns the keys in the range [key, end_key).
end_key must be lexicographically greater than start key.
sourcepub fn with_from_key(self) -> Self
pub fn with_from_key(self) -> Self
Gets all keys >= key.
sourcepub fn with_prefix(self) -> Self
pub fn with_prefix(self) -> Self
Gets all keys prefixed with key.
sourcepub fn with_all_keys(self) -> Self
pub fn with_all_keys(self) -> Self
Gets all keys.
sourcepub const fn with_limit(self, limit: i64) -> Self
pub const fn with_limit(self, limit: i64) -> Self
Limits the number of keys returned for the request. When limit is set to 0, it is treated as no limit.
sourcepub const fn with_revision(self, revision: i64) -> Self
pub const fn with_revision(self, revision: i64) -> Self
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.
sourcepub fn with_sort(self, target: SortTarget, order: SortOrder) -> Self
pub fn with_sort(self, target: SortTarget, order: SortOrder) -> Self
Sets the order for returned sorted results. It requires ‘with_range’ and/or ‘with_prefix’ to be specified too.
sourcepub const fn with_serializable(self) -> Self
pub const fn with_serializable(self) -> Self
Sets the get request to use serializable member-local reads. Get 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 get request is served locally without needing to reach consensus with other nodes in the cluster.
sourcepub const fn with_keys_only(self) -> Self
pub const fn with_keys_only(self) -> Self
Returns only the keys and not the values.
sourcepub const fn with_count_only(self) -> Self
pub const fn with_count_only(self) -> Self
Returns only the count of the keys in the range.
sourcepub const fn with_min_mod_revision(self, revision: i64) -> Self
pub const fn with_min_mod_revision(self, revision: i64) -> Self
Sets the lower bound for returned key mod revisions; all keys with lesser mod revisions will be filtered away.
sourcepub const fn with_max_mod_revision(self, revision: i64) -> Self
pub const fn with_max_mod_revision(self, revision: i64) -> Self
Sets the upper bound for returned key mod revisions; all keys with greater mod revisions will be filtered away.
sourcepub const fn with_min_create_revision(self, revision: i64) -> Self
pub const fn with_min_create_revision(self, revision: i64) -> Self
Sets the lower bound for returned key create revisions; all keys with lesser create revisions will be filtered away.
sourcepub const fn with_max_create_revision(self, revision: i64) -> Self
pub const fn with_max_create_revision(self, revision: i64) -> Self
max_create_revision is the upper bound for returned key create revisions; all keys with
greater create revisions will be filtered away.
Trait Implementations
sourceimpl Clone for GetOptions
impl Clone for GetOptions
sourcefn clone(&self) -> GetOptions
fn clone(&self) -> GetOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for GetOptions
impl Debug for GetOptions
sourceimpl Default for GetOptions
impl Default for GetOptions
sourcefn default() -> GetOptions
fn default() -> GetOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for GetOptions
impl Send for GetOptions
impl Sync for GetOptions
impl Unpin for GetOptions
impl UnwindSafe for GetOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message T in a tonic::Request
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more