pub struct Aggregator<T: Eq + Hash> { /* private fields */ }
Implementations§
Source§impl<T> Aggregator<T>
impl<T> Aggregator<T>
pub fn new( debounce: Duration, max_delay: Duration, callback_fn: Box<dyn Fn(HashSet<T>) + Send>, ) -> Aggregator<T>
pub fn extend(&mut self, payload: Vec<T>, ctx: &mut <Self as Actor>::Context)
pub fn flush_later(&mut self, ctx: &mut <Self as Actor>::Context)
pub fn flush(&mut self)
Trait Implementations§
Source§impl<T> Actor for Aggregator<T>
impl<T> Actor for Aggregator<T>
Source§type Context = Context<Aggregator<T>>
type Context = Context<Aggregator<T>>
Actor execution context type
Source§fn started(&mut self, ctx: &mut Self::Context)
fn started(&mut self, ctx: &mut Self::Context)
Called when an actor gets polled the first time.
Source§fn stopping(&mut self, ctx: &mut Self::Context) -> Running
fn stopping(&mut self, ctx: &mut Self::Context) -> Running
Called after an actor is in
Actor::Stopping
state. Read moreSource§fn start_in_arbiter<F>(arb: &Arbiter, f: F) -> Addr<Self>
fn start_in_arbiter<F>(arb: &Arbiter, f: F) -> Addr<Self>
Start new actor in arbiter’s thread.
Source§impl<T> Handler<AggregatorCmd<T>> for Aggregator<T>
impl<T> Handler<AggregatorCmd<T>> for Aggregator<T>
Source§impl<T> Supervised for Aggregator<T>
impl<T> Supervised for Aggregator<T>
Source§fn restarting(&mut self, _: &mut Self::Context)
fn restarting(&mut self, _: &mut Self::Context)
Called when the supervisor restarts a failed actor.
Auto Trait Implementations§
impl<T> Freeze for Aggregator<T>
impl<T> !RefUnwindSafe for Aggregator<T>
impl<T> Send for Aggregator<T>where
T: Send,
impl<T> !Sync for Aggregator<T>
impl<T> Unpin for Aggregator<T>where
T: Unpin,
impl<T> !UnwindSafe for Aggregator<T>
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