pub struct RemoteSession { /* private fields */ }Implementations§
Source§impl RemoteSession
impl RemoteSession
pub fn new( id: i64, addr: SocketAddr, stream: TcpStream, remote_server_config: RemoteServerConfigRef, ) -> RemoteSession
Source§impl RemoteSession
impl RemoteSession
pub async fn write(&mut self, message: ClientEvent)
Trait Implementations§
Source§impl Actor for RemoteSession
impl Actor for RemoteSession
Source§fn started<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut ActorContext,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn started<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut ActorContext,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: '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
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn stopped<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut ActorContext,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called once the Actor has stopped
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 on_child_stopped<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_id: &'life1 ActorId,
_ctx: &'life2 mut ActorContext,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_child_stopped<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_id: &'life1 ActorId,
_ctx: &'life2 mut ActorContext,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: '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 Handler<SessionWrite> for RemoteSession
impl Handler<SessionWrite> for RemoteSession
fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
message: SessionWrite,
_ctx: &'life1 mut ActorContext,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl Freeze for RemoteSession
impl RefUnwindSafe for RemoteSession
impl Send for RemoteSession
impl Sync for RemoteSession
impl Unpin for RemoteSession
impl UnsafeUnpin for RemoteSession
impl UnwindSafe for RemoteSession
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