Struct etcd_client::WatchOptions
source · [−]pub struct WatchOptions { /* private fields */ }Expand description
Options for Watch operation.
Implementations
sourceimpl WatchOptions
impl WatchOptions
sourcepub fn with_range(self, end: impl Into<Vec<u8>>) -> Self
pub fn with_range(self, end: impl Into<Vec<u8>>) -> Self
Sets the end of the range [key, end) to watch. If end is not given,
only the key argument is watched. If end is equal to ‘\0’, all keys greater than
or equal to the key argument are watched.
sourcepub fn with_from_key(self) -> Self
pub fn with_from_key(self) -> Self
Watches all keys >= key.
sourcepub fn with_prefix(self) -> Self
pub fn with_prefix(self) -> Self
Watches all keys prefixed with key.
sourcepub fn with_all_keys(self) -> Self
pub fn with_all_keys(self) -> Self
Watches all keys.
sourcepub const fn with_start_revision(self, revision: i64) -> Self
pub const fn with_start_revision(self, revision: i64) -> Self
Sets the revision to watch from (inclusive). No start_revision is “now”.
sourcepub const fn with_progress_notify(self) -> Self
pub const fn with_progress_notify(self) -> Self
progress_notify is set so that the etcd server will periodically send a WatchResponse with
no events to the new watcher if there are no recent events. It is useful when clients
wish to recover a disconnected watcher starting from a recent known revision.
The etcd server may decide how often it will send notifications based on current load.
sourcepub fn with_filters(self, filters: impl Into<Vec<WatchFilterType>>) -> Self
pub fn with_filters(self, filters: impl Into<Vec<WatchFilterType>>) -> Self
Filter the events at server side before it sends back to the watcher.
sourcepub const fn with_prev_key(self) -> Self
pub const fn with_prev_key(self) -> Self
If prev_kv is set, created watcher gets the previous KV before the event happens.
If the previous KV is already compacted, nothing will be returned.
sourcepub const fn with_watch_id(self, watch_id: i64) -> Self
pub const fn with_watch_id(self, watch_id: i64) -> Self
If watch_id is provided and non-zero, it will be assigned to this watcher.
Since creating a watcher in etcd is not a synchronous operation,
this can be used ensure that ordering is correct when creating multiple
watchers on the same stream. Creating a watcher with an ID already in
use on the stream will cause an error to be returned.
sourcepub const fn with_fragment(self) -> Self
pub const fn with_fragment(self) -> Self
Enables splitting large revisions into multiple watch responses.
Trait Implementations
sourceimpl Clone for WatchOptions
impl Clone for WatchOptions
sourcefn clone(&self) -> WatchOptions
fn clone(&self) -> WatchOptions
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 WatchOptions
impl Debug for WatchOptions
sourceimpl Default for WatchOptions
impl Default for WatchOptions
sourcefn default() -> WatchOptions
fn default() -> WatchOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for WatchOptions
impl Send for WatchOptions
impl Sync for WatchOptions
impl Unpin for WatchOptions
impl UnwindSafe for WatchOptions
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