pub struct OnResume;
Expand description
Sent by Connection after Backoff state is terminated
§Examples
use actix::prelude::*;
use nsq_client::{Connection, Subscribe, OnResume};
struct Consumer(pub Addr<Connection>);
impl Actor for Consumer {
type Context = Context<Self>;
fn started(&mut self, ctx: &mut Self::Context) {
self.subscribe::<OnResume>(ctx, self.0.clone());
}
}
impl Handler<OnResume> for Consumer {
type Result = ();
fn handle(&mut self, msg: OnResume, ctx: &mut Self::Conetxt) {
println!("resuming connection from backoff state");
}
}
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OnResume
impl RefUnwindSafe for OnResume
impl Send for OnResume
impl Sync for OnResume
impl Unpin for OnResume
impl UnwindSafe for OnResume
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