pub struct WatchResponse {
pub updates: Vec<RelationshipUpdate>,
pub changes_through: Option<ZedToken>,
pub optional_transaction_metadata: Option<Struct>,
pub schema_updated: bool,
pub is_checkpoint: bool,
pub full_revision_metadata: Vec<Struct>,
}Expand description
WatchResponse contains all mutation events in ascending timestamp order. This excludes relationships that were deleted because they expired. The response includes a field that can be used to resume watching from that point.
Fields§
§updates: Vec<RelationshipUpdate>updates are the RelationshipUpdate events that have occurred since the call was made, or since the point in time specified by changes_through.
changes_through: Option<ZedToken>changes_through is the ZedToken that represents the point in time that the watch response is current through. This token can be used in a subsequent WatchRequest to resume watching from this point.
optional_transaction_metadata: Option<Struct>optional_transaction_metadata is an optional field that returns the transaction metadata given to SpiceDB during the transaction that produced the changes in this response. This field may not exist if no transaction metadata was provided, or if multiple pieces of metadata were found during the transaction (in which case it is ambiguous which to return).
schema_updated: boolschema_updated, if true, indicates that the schema was changed in this revision.
is_checkpoint: boolis_checkpoint, if true, indicates that a checkpoint was reached. A checkpoint indicates that the server guarantees that the client will not observe any changes at a revision below or equal to the revision in this response.
full_revision_metadata: Vec<Struct>full_revision_metadata contains all transaction metadata given to SpiceDB during the revision that produced the changes in this response. Some datastores (such as CockroachDB) can “merge” multiple transactions into a single revision (if the changes occurred concurrently), so this field is a list of all transaction metadata seen during the revision.
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 moreSource§impl Debug for WatchResponse
impl Debug for WatchResponse
Source§impl Default for WatchResponse
impl Default for WatchResponse
Source§impl Message for WatchResponse
impl Message for WatchResponse
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 WatchResponse
impl PartialEq for WatchResponse
impl StructuralPartialEq for WatchResponse
Auto 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§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