[][src]Struct etcd_client::WatchOptions

pub struct WatchOptions { /* fields omitted */ }

Options for Watch operation.

Implementations

impl WatchOptions[src]

pub const fn new() -> Self[src]

Creates a new WatchOptions.

pub fn with_range(self, end: impl Into<Vec<u8>>) -> Self[src]

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.

pub fn with_from_key(self) -> Self[src]

Watches all keys >= key.

pub fn with_prefix(self) -> Self[src]

Watches all keys prefixed with key.

pub fn with_all_keys(self) -> Self[src]

Watches all keys.

pub const fn with_start_revision(self, revision: i64) -> Self[src]

Sets the revision to watch from (inclusive). No start_revision is "now".

pub const fn with_progress_notify(self) -> Self[src]

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.

pub fn with_filters(self, filters: impl Into<Vec<WatchFilterType>>) -> Self[src]

Filter the events at server side before it sends back to the watcher.

pub const fn with_prev_key(self) -> Self[src]

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.

pub const fn with_watch_id(self, watch_id: i64) -> Self[src]

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.

pub const fn with_fragment(self) -> Self[src]

Enables splitting large revisions into multiple watch responses.

Trait Implementations

impl Clone for WatchOptions[src]

impl Debug for WatchOptions[src]

impl Default for WatchOptions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]