pub enum TopicLogSyncEvent<E = ()> {
SessionStarted,
SyncStarted {
metrics: Metrics,
},
SyncFinished {
metrics: Metrics,
},
LiveModeStarted,
OperationReceived {
operation: Box<Operation<E>>,
metrics: Metrics,
},
SessionFinished {
metrics: Metrics,
},
Failed {
error: String,
},
}Expand description
Events emitted from topic log sync sessions.
Variants§
SessionStarted
A session has been initiated locally.
This event is always sent and will be followed by SyncStarted or Failed events.
SyncStarted
We have exchanged initial session metrics with the remote and the sync phase of this session has started.
This event will be followed by any number of OperationReceived events, or a SyncFinished or Failed.
SyncFinished
All past state has been replicated and we will now enter live mode LiveModeStarted (if configured) or the
session will end SessionFinished.
This event will be followed by a LiveModeStarted event or a SyncFinished or Failed event.
LiveModeStarted
The session has entered live mode, we will send and receive operations in realtime.
This event will be followed by any number of OperationReceived events or a SyncFinished or Failed event.
OperationReceived
An operation has been received, this can be in the “sync” or “live mode” phase of a session.
SessionFinished
The session has finished.
When no error occurs this event will always be sent at the end of a session.
Failed
The session failed.
This event will always be the final event sent when an error occurred in any phase of the session.
Trait Implementations§
Source§impl<E: Clone> Clone for TopicLogSyncEvent<E>
impl<E: Clone> Clone for TopicLogSyncEvent<E>
Source§fn clone(&self) -> TopicLogSyncEvent<E>
fn clone(&self) -> TopicLogSyncEvent<E>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<E: Debug> Debug for TopicLogSyncEvent<E>
impl<E: Debug> Debug for TopicLogSyncEvent<E>
Source§impl<E> From<LogSyncEvent<E>> for TopicLogSyncEvent<E>
impl<E> From<LogSyncEvent<E>> for TopicLogSyncEvent<E>
Source§fn from(event: LogSyncEvent<E>) -> Self
fn from(event: LogSyncEvent<E>) -> Self
Source§impl<E: PartialEq> PartialEq for TopicLogSyncEvent<E>
impl<E: PartialEq> PartialEq for TopicLogSyncEvent<E>
Source§fn eq(&self, other: &TopicLogSyncEvent<E>) -> bool
fn eq(&self, other: &TopicLogSyncEvent<E>) -> bool
self and other values to be equal, and is used by ==.impl<E: PartialEq> StructuralPartialEq for TopicLogSyncEvent<E>
Auto Trait Implementations§
impl<E> Freeze for TopicLogSyncEvent<E>
impl<E> RefUnwindSafe for TopicLogSyncEvent<E>where
E: RefUnwindSafe,
impl<E> Send for TopicLogSyncEvent<E>where
E: Send,
impl<E> Sync for TopicLogSyncEvent<E>where
E: Sync,
impl<E> Unpin for TopicLogSyncEvent<E>
impl<E> UnsafeUnpin for TopicLogSyncEvent<E>
impl<E> UnwindSafe for TopicLogSyncEvent<E>where
E: UnwindSafe,
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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more