pub struct WatchCreateRequest {
pub key: Vec<u8>,
pub range_end: Vec<u8>,
pub start_revision: i64,
pub progress_notify: bool,
pub filters: Vec<i32>,
pub prev_kv: bool,
}Fields§
§key: Vec<u8>key is the key to register for watching.
range_end: Vec<u8>range_end is the end of the range [key, range_end) to watch. If range_end is not given, only the key argument is watched. If range_end is equal to ‘\0’, all keys greater than or equal to the key argument are watched. If the range_end is one bit larger than the given key, then all keys with the prefix (the given key) will be watched.
start_revision: i64start_revision is an optional revision to watch from (inclusive). No start_revision is “now”.
progress_notify: boolprogress_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.
filters: Vec<i32>filters filter the events at server side before it sends back to the watcher.
prev_kv: boolIf 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.
Implementations§
Source§impl WatchCreateRequest
impl WatchCreateRequest
Sourcepub fn filters(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<FilterType>>
pub fn filters( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<FilterType>>
Returns an iterator which yields the valid enum values contained in filters.
Sourcepub fn push_filters(&mut self, value: FilterType)
pub fn push_filters(&mut self, value: FilterType)
Appends the provided enum value to filters.
Trait Implementations§
Source§impl Clone for WatchCreateRequest
impl Clone for WatchCreateRequest
Source§fn clone(&self) -> WatchCreateRequest
fn clone(&self) -> WatchCreateRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WatchCreateRequest
impl Debug for WatchCreateRequest
Source§impl Default for WatchCreateRequest
impl Default for WatchCreateRequest
Source§impl Hash for WatchCreateRequest
impl Hash for WatchCreateRequest
Source§impl Message for WatchCreateRequest
impl Message for WatchCreateRequest
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 WatchCreateRequest
impl PartialEq for WatchCreateRequest
impl Eq for WatchCreateRequest
impl StructuralPartialEq for WatchCreateRequest
Auto Trait Implementations§
impl Freeze for WatchCreateRequest
impl RefUnwindSafe for WatchCreateRequest
impl Send for WatchCreateRequest
impl Sync for WatchCreateRequest
impl Unpin for WatchCreateRequest
impl UnwindSafe for WatchCreateRequest
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