pub struct WatchRequest {
pub optional_object_types: Vec<String>,
pub optional_start_cursor: Option<ZedToken>,
pub optional_relationship_filters: Vec<RelationshipFilter>,
pub optional_update_kinds: Vec<i32>,
}Expand description
WatchRequest specifies what mutations to watch for, and an optional start point for when to start watching.
Fields§
§optional_object_types: Vec<String>optional_object_types is a filter of resource object types to watch for relationship changes. If specified, only changes to the specified object types will be returned and optional_relationship_filters cannot be used.
optional_start_cursor: Option<ZedToken>optional_start_cursor is the ZedToken holding the point-in-time at which to start watching for changes. If not specified, the watch will start from the current SpiceDB revision time of the request (“head revision”). Note that if this cursor references a point-in-time containing data that has been garbage collected, an error will be returned.
optional_relationship_filters: Vec<RelationshipFilter>optional_relationship_filters, if specified, indicates the filter(s) to apply to each relationship to be returned by watch. The relationship will be returned as long as at least one filter matches, this allows clients to match relationships on multiple filters on a single watch call. If specified, optional_object_types cannot be used.
optional_update_kinds: Vec<i32>optional_update_kinds, if specified, indicates what kinds of mutations to include. If your SpiceDB instance is running behind a proxy that aborts idle connections, we recommend including Checkpoints to keep the stream alive even when there are no changes.
Implementations§
Source§impl WatchRequest
impl WatchRequest
Sourcepub fn optional_update_kinds(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<WatchKind>>
pub fn optional_update_kinds( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<WatchKind>>
Returns an iterator which yields the valid enum values contained in optional_update_kinds.
Sourcepub fn push_optional_update_kinds(&mut self, value: WatchKind)
pub fn push_optional_update_kinds(&mut self, value: WatchKind)
Appends the provided enum value to optional_update_kinds.
Trait Implementations§
Source§impl Clone for WatchRequest
impl Clone for WatchRequest
Source§fn clone(&self) -> WatchRequest
fn clone(&self) -> WatchRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WatchRequest
impl Debug for WatchRequest
Source§impl Default for WatchRequest
impl Default for WatchRequest
Source§impl Message for WatchRequest
impl Message for WatchRequest
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 WatchRequest
impl PartialEq for WatchRequest
impl StructuralPartialEq for WatchRequest
Auto Trait Implementations§
impl Freeze for WatchRequest
impl RefUnwindSafe for WatchRequest
impl Send for WatchRequest
impl Sync for WatchRequest
impl Unpin for WatchRequest
impl UnwindSafe for WatchRequest
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<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