pub struct Doorbell { /* private fields */ }Expand description
A fan-out of commit subscribers. Cloneable and shareable; clones observe the same subscriber set.
Implementations§
Source§impl Doorbell
impl Doorbell
pub fn new() -> Self
Sourcepub fn subscribe<F>(&self, f: F)
pub fn subscribe<F>(&self, f: F)
Register a callback invoked for every subsequent Doorbell::ring.
Sourcepub fn ring(&self, event: &CommitEvent)
pub fn ring(&self, event: &CommitEvent)
Notify every subscriber of a commit. Consumers call this immediately
after a successful crate::WriterLog::append.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Doorbell
impl RefUnwindSafe for Doorbell
impl Send for Doorbell
impl Sync for Doorbell
impl Unpin for Doorbell
impl UnsafeUnpin for Doorbell
impl UnwindSafe for Doorbell
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