Skip to main content

ubiquisync_core/sync/
replica.rs

1//! [`Replica`]: a store readable and writable for any origin — the oplog.
2
3use super::processor::LogProcessor;
4use super::source::LogSource;
5
6/// A full replica: readable ([`LogSource`]) and writable for any origin
7/// ([`LogProcessor`]). The SQL oplog is this, so one type serves, relays, and
8/// merges. Contrast [`FileLogReplica`](super::FileLogReplica), which writes only
9/// its own origin.
10pub trait Replica<E>: LogProcessor<E> + LogSource<E> {}
11
12/// Anything that is both is a [`Replica`].
13impl<E, T: LogProcessor<E> + LogSource<E>> Replica<E> for T {}