[−][src]Struct meio::prelude::Address
Address
to send messages to Actor
.
Can be compared each other to identify senders to
the same Actor
.
Implementations
impl<A: Actor> Address<A>
[src]
pub fn id(&self) -> IdOf<A>
[src]
Returns a typed id of the Actor
.
pub async fn act<I>(&mut self, input: I) -> Result<(), Error> where
I: Action,
A: ActionHandler<I>,
[src]
I: Action,
A: ActionHandler<I>,
Just sends an Action
to the Actor
.
pub fn instant<I>(&mut self, input: I) -> Result<(), Error> where
I: InstantAction,
A: InstantActionHandler<I>,
[src]
I: InstantAction,
A: InstantActionHandler<I>,
Just sends an Action
to the Actor
.
pub fn schedule<I>(&mut self, input: I, deadline: Instant) -> Result<(), Error> where
I: Send + 'static,
A: Scheduled<I>,
[src]
I: Send + 'static,
A: Scheduled<I>,
Just sends an Action
to the Actor
.
pub async fn interact<I>(&mut self, request: I) -> Result<I::Output, Error> where
I: Interaction,
A: InteractionHandler<I>,
[src]
I: Interaction,
A: InteractionHandler<I>,
Interacts with an Actor
and waits for the result of the Interaction
.
pub async fn join(&mut self)
[src]
Waits when the Actor
will be terminated.
pub fn attach<S>(&self, stream: S) where
A: Consumer<S::Item>,
S: Stream + Send + Unpin + 'static,
S::Item: Send + 'static,
[src]
A: Consumer<S::Item>,
S: Stream + Send + Unpin + 'static,
S::Item: Send + 'static,
Attaches a Stream
of event to an Actor
.
pub fn link<T>(&self) -> T where
T: From<Self>,
[src]
T: From<Self>,
Returns a Link
to an Actor
.
Link
is a convenient concept for creating wrappers for
Address
that provides methods instead of using message types
directly. It allows also to use private message types opaquely.
pub fn action_recipient<T>(&self) -> Box<dyn ActionRecipient<T>> where
T: Action,
A: ActionHandler<T>,
[src]
T: Action,
A: ActionHandler<T>,
Returns an ActionRecipient
instance.
pub fn interaction_recipient<T>(&self) -> Box<dyn InteractionRecipient<T>> where
T: Interaction,
A: InteractionHandler<T>,
[src]
T: Interaction,
A: InteractionHandler<T>,
Returns an InteractionRecipient
instance.
Trait Implementations
impl<T, A> ActionRecipient<T> for Address<A> where
T: Action,
A: Actor + ActionHandler<T>,
[src]
T: Action,
A: Actor + ActionHandler<T>,
pub fn act<'life0, 'async_trait>(
&'life0 mut self,
msg: T
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
msg: T
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn id_ref(&self) -> &Id
[src]
pub fn dyn_clone(&self) -> Box<dyn ActionRecipient<T>>
[src]
pub fn dyn_hash(&self, state: &mut dyn Hasher)
[src]
impl<A: Actor> Clone for Address<A>
[src]
pub fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<A: Actor> Debug for Address<A>
[src]
impl<A: Actor> Eq for Address<A>
[src]
impl<A: Actor> Hash for Address<A>
[src]
pub fn hash<H: Hasher>(&self, state: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T, A> InteractionRecipient<T> for Address<A> where
T: Interaction,
A: Actor + InteractionHandler<T>,
[src]
T: Interaction,
A: Actor + InteractionHandler<T>,
pub fn interact<'life0, 'async_trait>(
&'life0 mut self,
msg: T
) -> Pin<Box<dyn Future<Output = Result<T::Output, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
msg: T
) -> Pin<Box<dyn Future<Output = Result<T::Output, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn id_ref(&self) -> &Id
[src]
pub fn dyn_clone(&self) -> Box<dyn InteractionRecipient<T>>
[src]
pub fn dyn_hash(&self, state: &mut dyn Hasher)
[src]
impl<T, A> Into<Box<dyn ActionRecipient<T> + 'static, Global>> for Address<A> where
T: Action,
A: Actor + ActionHandler<T>,
[src]
T: Action,
A: Actor + ActionHandler<T>,
pub fn into(self) -> Box<dyn ActionRecipient<T>>
[src]
impl<T, A> Into<Box<dyn InteractionRecipient<T> + 'static, Global>> for Address<A> where
T: Interaction,
A: Actor + InteractionHandler<T>,
[src]
T: Interaction,
A: Actor + InteractionHandler<T>,
pub fn into(self) -> Box<dyn InteractionRecipient<T>>
[src]
impl<A: Actor> PartialEq<Address<A>> for Address<A>
[src]
Auto Trait Implementations
impl<A> !RefUnwindSafe for Address<A>
[src]
impl<A> Send for Address<A>
[src]
impl<A> Sync for Address<A>
[src]
impl<A> Unpin for Address<A>
[src]
impl<A> !UnwindSafe for Address<A>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,