pub struct LogSyncProtocol<TM, L, E, S: LogStore<L, E>> { /* private fields */ }Expand description
Efficient sync protocol for append-only log data types.
Implementations§
Trait Implementations§
Source§impl<TM: Clone, L: Clone, E: Clone, S: Clone + LogStore<L, E>> Clone for LogSyncProtocol<TM, L, E, S>
impl<TM: Clone, L: Clone, E: Clone, S: Clone + LogStore<L, E>> Clone for LogSyncProtocol<TM, L, E, S>
Source§fn clone(&self) -> LogSyncProtocol<TM, L, E, S>
fn clone(&self) -> LogSyncProtocol<TM, L, E, S>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<TM: Debug, L: Debug, E: Debug, S: Debug + LogStore<L, E>> Debug for LogSyncProtocol<TM, L, E, S>
impl<TM: Debug, L: Debug, E: Debug, S: Debug + LogStore<L, E>> Debug for LogSyncProtocol<TM, L, E, S>
Source§impl<'a, T, TM, L, E, S> SyncProtocol<'a, T> for LogSyncProtocol<TM, L, E, S>where
T: TopicQuery,
TM: TopicLogMap<T, L>,
L: LogId + Send + Sync + for<'de> Deserialize<'de> + Serialize + 'a,
E: Extensions + Send + Sync + 'a,
S: Debug + Sync + LogStore<L, E>,
impl<'a, T, TM, L, E, S> SyncProtocol<'a, T> for LogSyncProtocol<TM, L, E, S>where
T: TopicQuery,
TM: TopicLogMap<T, L>,
L: LogId + Send + Sync + for<'de> Deserialize<'de> + Serialize + 'a,
E: Extensions + Send + Sync + 'a,
S: Debug + Sync + LogStore<L, E>,
Source§fn name(&self) -> &'static str
fn name(&self) -> &'static str
Custom identifier for this sync protocol implementation. Read more
Source§fn initiate<'async_trait>(
self: Arc<Self>,
topic_query: T,
tx: Box<&'a mut (dyn AsyncWrite + Send + Unpin)>,
rx: Box<&'a mut (dyn AsyncRead + Send + Unpin)>,
app_tx: Box<&'a mut (dyn Sink<FromSync<T>, Error = SyncError> + Send + Unpin)>,
) -> Pin<Box<dyn Future<Output = Result<(), SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
fn initiate<'async_trait>(
self: Arc<Self>,
topic_query: T,
tx: Box<&'a mut (dyn AsyncWrite + Send + Unpin)>,
rx: Box<&'a mut (dyn AsyncRead + Send + Unpin)>,
app_tx: Box<&'a mut (dyn Sink<FromSync<T>, Error = SyncError> + Send + Unpin)>,
) -> Pin<Box<dyn Future<Output = Result<(), SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Initiate a sync protocol session over the provided bi-directional stream for the given
topic query. Read more
Source§fn accept<'async_trait>(
self: Arc<Self>,
tx: Box<&'a mut (dyn AsyncWrite + Send + Unpin)>,
rx: Box<&'a mut (dyn AsyncRead + Send + Unpin)>,
app_tx: Box<&'a mut (dyn Sink<FromSync<T>, Error = SyncError> + Send + Unpin)>,
) -> Pin<Box<dyn Future<Output = Result<(), SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
fn accept<'async_trait>(
self: Arc<Self>,
tx: Box<&'a mut (dyn AsyncWrite + Send + Unpin)>,
rx: Box<&'a mut (dyn AsyncRead + Send + Unpin)>,
app_tx: Box<&'a mut (dyn Sink<FromSync<T>, Error = SyncError> + Send + Unpin)>,
) -> Pin<Box<dyn Future<Output = Result<(), SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Accept a sync protocol session over the provided bi-directional stream. Read more
Auto Trait Implementations§
impl<TM, L, E, S> Freeze for LogSyncProtocol<TM, L, E, S>
impl<TM, L, E, S> RefUnwindSafe for LogSyncProtocol<TM, L, E, S>
impl<TM, L, E, S> Send for LogSyncProtocol<TM, L, E, S>
impl<TM, L, E, S> Sync for LogSyncProtocol<TM, L, E, S>
impl<TM, L, E, S> Unpin for LogSyncProtocol<TM, L, E, S>
impl<TM, L, E, S> UnwindSafe for LogSyncProtocol<TM, L, E, S>
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
Mutably borrows from an owned value. Read more