Struct ckb_network::network::EventHandler [−][src]
pub struct EventHandler<T> { /* fields omitted */ }Expand description
Used to handle global events of tentacle, such as session open/close
Trait Implementations
impl<T: ExitHandler> ServiceHandle for EventHandler<T>[src]
impl<T: ExitHandler> ServiceHandle for EventHandler<T>[src]fn handle_error(&mut self, context: &mut ServiceContext, error: ServiceError)[src]
fn handle_error(&mut self, context: &mut ServiceContext, error: ServiceError)[src]Handling runtime errors
fn handle_event(&mut self, context: &mut ServiceContext, event: ServiceEvent)[src]
fn handle_event(&mut self, context: &mut ServiceContext, event: ServiceEvent)[src]Handling session establishment and disconnection events
fn handle_proto(&mut self, _control: &mut ServiceContext, _event: ProtocolEvent)[src]
fn handle_proto(&mut self, _control: &mut ServiceContext, _event: ProtocolEvent)[src]👎 Deprecated since 0.3.5:
use ProtocolSpawn instead
Handling all protocol events Read more
Auto Trait Implementations
impl<T> !RefUnwindSafe for EventHandler<T>
impl<T> Send for EventHandler<T> where
T: Send,
T: Send,
impl<T> Sync for EventHandler<T> where
T: Sync,
T: Sync,
impl<T> Unpin for EventHandler<T> where
T: Unpin,
T: Unpin,
impl<T> !UnwindSafe for EventHandler<T>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,