pub struct SyncPlugin { /* private fields */ }Expand description
Plugin that marks auto-sync as active. Sends change notifications to the background push task via an mpsc channel.
Implementations§
Source§impl SyncPlugin
impl SyncPlugin
pub fn new(tx: UnboundedSender<()>) -> Self
pub fn pending_lsn(&self) -> u64
Sourcepub fn notify_change(&self) -> Result<(), &'static str>
pub fn notify_change(&self) -> Result<(), &'static str>
Signal the background push task that a DML change occurred.
Trait Implementations§
Source§impl DatabasePlugin for SyncPlugin
impl DatabasePlugin for SyncPlugin
fn post_commit(&self, ws: &WriteSet, source: CommitSource)
fn pre_commit(&self, _ws: &WriteSet, _source: CommitSource) -> Result<(), Error>
fn on_open(&self) -> Result<(), Error>
fn on_close(&self) -> Result<(), Error>
fn on_ddl(&self, _change: &DdlChange) -> Result<(), Error>
fn on_query(&self, _sql: &str) -> Result<(), Error>
fn post_query(&self, _sql: &str, _duration: Duration, _outcome: &QueryOutcome)
fn health(&self) -> PluginHealth
fn describe(&self) -> Value
fn on_sync_push(&self, _changeset: &mut ChangeSet) -> Result<(), Error>
fn on_sync_pull(&self, _changeset: &mut ChangeSet) -> Result<(), Error>
Auto Trait Implementations§
impl !Freeze for SyncPlugin
impl RefUnwindSafe for SyncPlugin
impl Send for SyncPlugin
impl Sync for SyncPlugin
impl Unpin for SyncPlugin
impl UnsafeUnpin for SyncPlugin
impl UnwindSafe for SyncPlugin
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
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>
Converts
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>
Converts
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