Struct rillrate::WayLink [−][src]
pub struct WayLink { /* fields omitted */ }
Expand description
Implementations
Installs the assets as the app.
When the app is added the actors automatically creates all necessary routes for the app.
Methods from Deref<Target = Address<Way>>
Just sends an Action
to the Actor
.
pub fn instant<I>(&self, input: I) -> Result<(), Error> where
I: InstantAction,
A: InstantActionHandler<I>,
pub fn instant<I>(&self, input: I) -> Result<(), Error> where
I: InstantAction,
A: InstantActionHandler<I>,
Just sends an Action
to the Actor
.
Just sends an Action
to the Actor
.
Send Handler
as an event
pub fn interact<I>(&self, request: I) -> Result<InteractionTask<I>, Error> where
I: Interaction,
A: ActionHandler<Interact<I>>,
pub fn interact<I>(&self, request: I) -> Result<InteractionTask<I>, Error> where
I: Interaction,
A: ActionHandler<Interact<I>>,
Interacts with an Actor
and waits for the result of the Interaction
.
ActionHandler
required instead of InteractionHandler
to make it possible
to work with both types of handler, because ActionHandler
can be used
for long running interaction and prevent blocking of the actor’s routine.
To avoid blocking you shouldn’t await
the result of this Interaction
,
but create a Future
and await
in a separate coroutine of in a LiteTask
.
Waits when the Actor
will be terminated.
It consumes address, because it useless after termination.
Also it prevents blocking queue if Actor
uses it to detect
the right time for termination.
Send termination signal to the actor through the normal priority queue.
Attaches a Stream
of event to an Actor
.
Optimized for intensive streams. For moderate flow you still can
use ordinary Action
s and act
method calls.
It spawns a routine that groups multiple items into a single chunk
to reduce amount as async
calls of a handler.
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> + 'static, Global> where
T: Action,
A: ActionHandler<T>,
pub fn action_recipient<T>(
&self
) -> Box<dyn ActionRecipient<T> + 'static, Global> where
T: Action,
A: ActionHandler<T>,
Returns an ActionRecipient
instance.
pub fn interaction_recipient<T>(
&self
) -> Box<dyn InteractionRecipient<T> + 'static, Global> where
T: Interaction,
A: InteractionHandler<T>,
pub fn interaction_recipient<T>(
&self
) -> Box<dyn InteractionRecipient<T> + 'static, Global> where
T: Interaction,
A: InteractionHandler<T>,
Returns an InteractionRecipient
instance.
pub fn add_hook<T>(&self, hook: T) -> Result<HookGuard<T>, Error> where
T: Hook,
A: HookHandler<T> + ActionHandler<AddHook<T>>,
pub fn add_hook<T>(&self, hook: T) -> Result<HookGuard<T>, Error> where
T: Hook,
A: HookHandler<T> + ActionHandler<AddHook<T>>,
Assing a hook to an actor.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for WayLink
impl !UnwindSafe for WayLink
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert self
to an optional value of a Properties
struct.
Convert self
to a value of a Properties
struct.
Convert self
to a value of a Properties
struct.
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more