pub struct CallbackStyleConnection<EH: EventHandler> { /* private fields */ }Implementations§
Source§impl<EH: EventHandler> CallbackStyleConnection<EH>
impl<EH: EventHandler> CallbackStyleConnection<EH>
pub fn new( endpoint: String, options: ConnectionOptions, event_handler: EH, ) -> Self
pub fn start3( endpoint: String, options: ConnectionOptions, event_handler: EH, ) -> Addr<Self>
pub fn start4( endpoint: String, options: ConnectionOptions, arbiter: ArbiterHandle, event_handler: EH, ) -> Addr<Self>
pub async fn stop(addr: Addr<Self>) -> Result<(), HandleError<StopMsg>>
pub fn dump_info(addr: Addr<Self>)
Trait Implementations§
Source§impl<EH: EventHandler> Actor for CallbackStyleConnection<EH>
impl<EH: EventHandler> Actor for CallbackStyleConnection<EH>
Source§type Context = Context<CallbackStyleConnection<EH>>
type Context = Context<CallbackStyleConnection<EH>>
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, _: &mut Self::Context) -> Running
fn stopping(&mut self, _: &mut Self::Context) -> Running
Called after an actor is in
Actor::Stopping state. Read moreSource§fn start_in_arbiter<F>(wrk: &ArbiterHandle, f: F) -> Addr<Self>
fn start_in_arbiter<F>(wrk: &ArbiterHandle, f: F) -> Addr<Self>
Start new actor in arbiter’s thread.
Source§impl<EH: EventHandler> Handler<DumpInfoMsg> for CallbackStyleConnection<EH>
impl<EH: EventHandler> Handler<DumpInfoMsg> for CallbackStyleConnection<EH>
Source§impl<EH: EventHandler> Handler<ProtocolMsg> for CallbackStyleConnection<EH>
impl<EH: EventHandler> Handler<ProtocolMsg> for CallbackStyleConnection<EH>
Source§type Result = Pin<Box<dyn Future<Output = Result<ProtocolMsg, HandleError<ProtocolMsg>>>>>
type Result = Pin<Box<dyn Future<Output = Result<ProtocolMsg, HandleError<ProtocolMsg>>>>>
The type of value that this handler will return. Read more
Source§impl<EH: EventHandler> Handler<StopMsg> for CallbackStyleConnection<EH>
impl<EH: EventHandler> Handler<StopMsg> for CallbackStyleConnection<EH>
impl<EH: EventHandler> Connection for CallbackStyleConnection<EH>
Auto Trait Implementations§
impl<EH> Freeze for CallbackStyleConnection<EH>
impl<EH> !RefUnwindSafe for CallbackStyleConnection<EH>
impl<EH> !Send for CallbackStyleConnection<EH>
impl<EH> !Sync for CallbackStyleConnection<EH>
impl<EH> Unpin for CallbackStyleConnection<EH>
impl<EH> !UnwindSafe for CallbackStyleConnection<EH>
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