pub struct NodeDirectoryActor { /* private fields */ }Expand description
Native coerce actor wrapping NodeDirectory.
Implementations§
Trait Implementations§
Source§impl Actor for NodeDirectoryActor
impl Actor for NodeDirectoryActor
Source§fn new_context(
&self,
system: Option<ActorSystem>,
status: ActorStatus,
boxed_ref: BoxedActorRef,
) -> ActorContext
fn new_context( &self, system: Option<ActorSystem>, status: ActorStatus, boxed_ref: BoxedActorRef, ) -> ActorContext
Creates a new
ActorContext, allowing actor implementations to override
specific parts of the ActorContext, before the actor is started.Source§fn started<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_ctx: &'life1 mut ActorContext,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn started<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_ctx: &'life1 mut ActorContext,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Called once the Actor has been started
Source§fn stopped<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_ctx: &'life1 mut ActorContext,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn stopped<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_ctx: &'life1 mut ActorContext,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Called once the Actor has stopped
Source§fn on_child_stopped<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_id: &'life1 Arc<str>,
_ctx: &'life2 mut ActorContext,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn on_child_stopped<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_id: &'life1 Arc<str>,
_ctx: &'life2 mut ActorContext,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Called when a supervised actor has stopped
Source§fn actor_ref(&self, ctx: &ActorContext) -> LocalActorRef<Self>where
Self: Sized,
fn actor_ref(&self, ctx: &ActorContext) -> LocalActorRef<Self>where
Self: Sized,
Returns a
LocalActorRef<Self> instance of the current actor,
automatically casting from the ActorContext’s BoxedActorRef.Source§const DEFAULT_TAGS: ActorTags = { ActorTags::None }
const DEFAULT_TAGS: ActorTags = { ActorTags::None }
Default tags used when creating the actor
Source§impl Default for NodeDirectoryActor
impl Default for NodeDirectoryActor
Source§impl Handler<ConnectPeer> for NodeDirectoryActor
impl Handler<ConnectPeer> for NodeDirectoryActor
fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
msg: ConnectPeer,
_ctx: &'life1 mut ActorContext,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl Handler<DisconnectPeer> for NodeDirectoryActor
impl Handler<DisconnectPeer> for NodeDirectoryActor
fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
msg: DisconnectPeer,
_ctx: &'life1 mut ActorContext,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl Handler<GetConnectedCount> for NodeDirectoryActor
impl Handler<GetConnectedCount> for NodeDirectoryActor
fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_msg: GetConnectedCount,
_ctx: &'life1 mut ActorContext,
) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl Handler<GetPeerCount> for NodeDirectoryActor
impl Handler<GetPeerCount> for NodeDirectoryActor
fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_msg: GetPeerCount,
_ctx: &'life1 mut ActorContext,
) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl Handler<GetPeerInfo> for NodeDirectoryActor
impl Handler<GetPeerInfo> for NodeDirectoryActor
Source§impl Handler<IsConnected> for NodeDirectoryActor
impl Handler<IsConnected> for NodeDirectoryActor
fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
msg: IsConnected,
_ctx: &'life1 mut ActorContext,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl Freeze for NodeDirectoryActor
impl RefUnwindSafe for NodeDirectoryActor
impl Send for NodeDirectoryActor
impl Sync for NodeDirectoryActor
impl Unpin for NodeDirectoryActor
impl UnsafeUnpin for NodeDirectoryActor
impl UnwindSafe for NodeDirectoryActor
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