Struct etcd_client::WatchResponse
source · pub struct WatchResponse(/* private fields */);
Expand description
Response for Watch
operation.
Implementations§
source§impl WatchResponse
impl WatchResponse
sourcepub fn header(&self) -> Option<&ResponseHeader>
pub fn header(&self) -> Option<&ResponseHeader>
Watch response header.
sourcepub fn take_header(&mut self) -> Option<ResponseHeader>
pub fn take_header(&mut self) -> Option<ResponseHeader>
Takes the header out of the response, leaving a None
in its place.
sourcepub const fn created(&self) -> bool
pub const fn created(&self) -> bool
created is set to true if the response is for a create watch request. The client should record the watch_id and expect to receive events for the created watcher from the same stream. All events sent to the created watcher will attach with the same watch_id.
sourcepub const fn canceled(&self) -> bool
pub const fn canceled(&self) -> bool
canceled
is set to true if the response is for a cancel watch request.
No further events will be sent to the canceled watcher.
sourcepub const fn compact_revision(&self) -> i64
pub const fn compact_revision(&self) -> i64
compact_revision
is set to the minimum index if a watcher tries to watch
at a compacted index.
This happens when creating a watcher at a compacted revision or the watcher cannot catch up with the progress of the key-value store.
The client should treat the watcher as canceled and should not try to create any watcher with the same start_revision again.
sourcepub fn cancel_reason(&self) -> &str
pub fn cancel_reason(&self) -> &str
Indicates the reason for canceling the watcher.
Trait Implementations§
source§impl Clone for WatchResponse
impl Clone for WatchResponse
source§fn clone(&self) -> WatchResponse
fn clone(&self) -> WatchResponse
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for WatchResponse
impl RefUnwindSafe for WatchResponse
impl Send for WatchResponse
impl Sync for WatchResponse
impl Unpin for WatchResponse
impl UnwindSafe for WatchResponse
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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