pub struct ClientSession<T: Supervisor> { /* private fields */ }Implementations§
Source§impl<T: Supervisor> ClientSession<T>
impl<T: Supervisor> ClientSession<T>
pub fn new( supervisor: SupervisorLink<T>, handler: WsHandler<ClientProtocol>, registry: Registry, global_acl: SessionAcl, ) -> Self
Trait Implementations§
Source§impl<T: Supervisor> ActionHandler<WsIncoming<ServiceEnvelope<ClientProtocol, ClientRequest, ClientServiceResponse>>> for ClientSession<T>
impl<T: Supervisor> ActionHandler<WsIncoming<ServiceEnvelope<ClientProtocol, ClientRequest, ClientServiceResponse>>> for ClientSession<T>
Source§fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
msg: WsIncoming<ServiceEnvelope<ClientProtocol, ClientRequest, ClientServiceResponse>>,
ctx: &'life1 mut Context<Self>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
msg: WsIncoming<ServiceEnvelope<ClientProtocol, ClientRequest, ClientServiceResponse>>,
ctx: &'life1 mut Context<Self>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Asyncronous method that receives incoming message.
Source§impl<T: Supervisor> Actor for ClientSession<T>
impl<T: Supervisor> Actor for ClientSession<T>
Source§impl<T: Supervisor> Eliminated<<T as Supervisor>::ClientAssistant> for ClientSession<T>
impl<T: Supervisor> Eliminated<<T as Supervisor>::ClientAssistant> for ClientSession<T>
Source§fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_id: IdOf<T::ClientAssistant>,
ctx: &'life1 mut Context<Self>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_id: IdOf<T::ClientAssistant>,
ctx: &'life1 mut Context<Self>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called when the
Actor finished.Source§impl<T: Supervisor> Eliminated<ClientSession<T>> for Router<T>
impl<T: Supervisor> Eliminated<ClientSession<T>> for Router<T>
Source§fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
id: IdOf<ClientSession<T>>,
_ctx: &'life1 mut Context<Self>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
id: IdOf<ClientSession<T>>,
_ctx: &'life1 mut Context<Self>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called when the
Actor finished.Source§impl<T: Supervisor> InteractionDone<GetClientAssistant<T>, ()> for ClientSession<T>
impl<T: Supervisor> InteractionDone<GetClientAssistant<T>, ()> for ClientSession<T>
Source§fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_tag: (),
assistant: T::ClientAssistant,
ctx: &'life1 mut Context<Self>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_tag: (),
assistant: T::ClientAssistant,
ctx: &'life1 mut Context<Self>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Handling of the interaction result.
Source§fn failed<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_tag: M,
err: TaskError,
_ctx: &'life1 mut Context<Self>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Send + 'async_trait,
fn failed<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_tag: M,
err: TaskError,
_ctx: &'life1 mut Context<Self>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Send + 'async_trait,
Called when interaction failed.
Source§impl<T: Supervisor> InterruptedBy<Router<T>> for ClientSession<T>
impl<T: Supervisor> InterruptedBy<Router<T>> for ClientSession<T>
Source§fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut Context<Self>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut Context<Self>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called when the
Actor terminated by another actor. Read moreSource§impl<T: Supervisor> StartedBy<Router<T>> for ClientSession<T>
impl<T: Supervisor> StartedBy<Router<T>> for ClientSession<T>
Source§impl<T: Supervisor> TaskEliminated<WsProcessor<ClientProtocol, ClientSession<T>>, ()> for ClientSession<T>
impl<T: Supervisor> TaskEliminated<WsProcessor<ClientProtocol, ClientSession<T>>, ()> for ClientSession<T>
Source§fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_id: IdOf<WsProcessor<ClientProtocol, Self>>,
_tag: (),
_result: Result<TermReason, TaskError>,
ctx: &'life1 mut Context<Self>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_id: IdOf<WsProcessor<ClientProtocol, Self>>,
_tag: (),
_result: Result<TermReason, TaskError>,
ctx: &'life1 mut Context<Self>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called when the
Task finished.Auto Trait Implementations§
impl<T> !Freeze for ClientSession<T>
impl<T> !RefUnwindSafe for ClientSession<T>
impl<T> Send for ClientSession<T>
impl<T> !Sync for ClientSession<T>
impl<T> Unpin for ClientSession<T>
impl<T> !UnwindSafe for ClientSession<T>
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
Source§impl<T, S> InstantActionHandler<Awake<S>> for T
impl<T, S> InstantActionHandler<Awake<S>> for T
Source§fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_input: Awake<S>,
ctx: &'life1 mut Context<T>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_input: Awake<S>,
ctx: &'life1 mut Context<T>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
Asyncronous method that receives incoming message.
Source§impl<T, C> InstantActionHandler<Done<C>> for Twhere
T: Eliminated<C>,
C: Actor,
impl<T, C> InstantActionHandler<Done<C>> for Twhere
T: Eliminated<C>,
C: Actor,
Source§fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
done: Done<C>,
ctx: &'life1 mut Context<T>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
done: Done<C>,
ctx: &'life1 mut Context<T>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
Asyncronous method that receives incoming message.
Source§impl<T, S> InstantActionHandler<Interrupt<S>> for Twhere
T: InterruptedBy<S>,
S: Actor,
impl<T, S> InstantActionHandler<Interrupt<S>> for Twhere
T: InterruptedBy<S>,
S: Actor,
Source§fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_input: Interrupt<S>,
ctx: &'life1 mut Context<T>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_input: Interrupt<S>,
ctx: &'life1 mut Context<T>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
Asyncronous method that receives incoming message.
Source§impl<T, C, M> InstantActionHandler<TaskDone<C, M>> for T
impl<T, C, M> InstantActionHandler<TaskDone<C, M>> for T
Source§fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
done: TaskDone<C, M>,
ctx: &'life1 mut Context<T>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
done: TaskDone<C, M>,
ctx: &'life1 mut Context<T>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
Asyncronous method that receives incoming message.
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T, I, M> TaskEliminated<InteractionTask<I>, M> for T
impl<T, I, M> TaskEliminated<InteractionTask<I>, M> for T
Source§fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_id: IdOf<InteractionTask<I>>,
tag: M,
result: Result<<I as Interaction>::Output, TaskError>,
ctx: &'life1 mut Context<T>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_id: IdOf<InteractionTask<I>>,
tag: M,
result: Result<<I as Interaction>::Output, TaskError>,
ctx: &'life1 mut Context<T>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
Called when the
Task finished.