#[non_exhaustive]pub enum Update {
Transaction(Transaction),
Reassignment(Reassignment),
TopologyTransaction(TopologyTransaction),
OffsetCheckpoint(OffsetCheckpoint),
}Expand description
One update, as a stream, a page or a point read returns it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Transaction(Transaction)
A committed transaction.
Reassignment(Reassignment)
A contract moving between synchronizers.
TopologyTransaction(TopologyTransaction)
A topology change affecting the subscribed parties.
OffsetCheckpoint(OffsetCheckpoint)
A position the participant names as safe to resume from; carries no change.
Implementations§
Source§impl Update
impl Update
Sourcepub fn as_transaction(&self) -> Option<&Transaction>
pub fn as_transaction(&self) -> Option<&Transaction>
The transaction, when this update is one.
Sourcepub fn from_grpc(update: Update) -> Result<Self>
pub fn from_grpc(update: Update) -> Result<Self>
An element of a gRPC update stream or page.
§Errors
Error::UnexpectedResponse if the update is malformed.
Sourcepub fn from_grpc_point(update: Update) -> Result<Self>
pub fn from_grpc_point(update: Update) -> Result<Self>
The result of a gRPC point read
(update_by_id,
update_by_offset).
§Errors
Error::UnexpectedResponse if the update is malformed.
Sourcepub fn from_json(element: &Value) -> Result<Self>
pub fn from_json(element: &Value) -> Result<Self>
An element as the JSON API returns it: {"update": {"Transaction": {"value": …}}} from updates and the
point reads, or the inner {"Transaction": {"value": …}} a WebSocket
frame carries.
§Errors
Error::UnexpectedResponse if the element is not an update the JSON
API describes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Update
impl RefUnwindSafe for Update
impl Send for Update
impl Sync for Update
impl Unpin for Update
impl UnsafeUnpin for Update
impl UnwindSafe for Update
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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::RequestSource§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