[][src]Module actix::prelude

The actix prelude.

The purpose of this module is to alleviate imports of many common actix traits by adding a glob import to the top of actix heavy modules:

use actix::prelude::*;

Re-exports

pub use crate::fut::ActorFuture;
pub use crate::fut::ActorStream;
pub use crate::fut::WrapFuture;
pub use crate::fut::WrapStream;
pub use crate::registry::ArbiterService;
pub use crate::registry::SystemService;
pub use crate::sync::SyncArbiter;
pub use crate::sync::SyncContext;
pub use crate::actors;
pub use crate::dev;
pub use crate::fut;
pub use crate::io;
pub use crate::utils::Condition;
pub use crate::utils::IntervalFunc;
pub use crate::utils::TimerFunc;

Structs

ActorResponse

A helper type for representing different types of message responses.

Addr

The address of an actor.

Arbiter

Arbiters provide an asynchronous execution environment for actors, functions and futures. When an Arbiter is created, it spawns a new OS thread, and hosts an event loop. Some Arbiter functions execute on the current thread.

AtomicResponse

A specialized actor future holder for atomic asynchronous message handling.

Context

An actor execution context.

MessageResult

A helper type that implements the MessageResponse trait.

Recipient

The Recipient type allows to send one specific message to an actor.

RecipientRequest

A Future which represents an asynchronous message sending process.

Request

A Future which represents an asynchronous message sending process.

Response

Helper type for representing different type of message responses

SpawnHandle

A handle to a spawned future.

Supervisor

Actor supervisor

System

System is a runtime manager.

SystemRunner

Helper object that runs System's event loop

Enums

ActorState

Actor execution state

MailboxError

The errors that can occur during the message delivery process.

Running
SendError

Traits

Actor

Actors are objects which encapsulate state and behavior.

ActorContext

Actor execution context.

AsyncContext

Asynchronous execution context.

ContextFutureSpawner

Helper trait which can spawn a future into the actor's context.

Future

A future represents an asynchronous computation.

Handler

Describes how to handle messages of a specific type.

Message

Represent message that can be handled by an actor.

Stream

A stream of values produced asynchronously.

StreamHandler

Stream handler

Supervised

Actors with the ability to restart after failure.

Type Definitions

ResponseActFuture

A specialized actor future for asynchronous message handling.

ResponseFuture

A specialized future for asynchronous message handling.