Crate actix [] [src]

Actix is a rust actors framework.

Actors are objects which encapsulate state and behavior, they communicate exclusively by exchanging messages. Actix actors are implemented on top of Tokio. Multiple actors could run in same thread. Actors could run in multiple threads with support of Arbiter. Actors exchange typed messages.

Documentation

Features

  • Async/Sync actors.
  • Actor communication in a local/thread context.
  • Using Futures for asynchronous message handling.
  • HTTP1/HTTP2 support (actix-web)
  • Actor supervision.
  • Typed messages (No Any type). Generic messages are allowed.
  • Minimum supported Rust version: 1.21 or later

Reexports

pub use fut::ActorFuture;
pub use fut::ActorStream;
pub use fut::WrapFuture;
pub use fut::WrapStream;
pub use sync::SyncContext;
pub use sync::SyncArbiter;

Modules

actors

Helper actors

dev

The actix prelude for library developers

fut

Custom Future implementation with Actix support

io
msgs

Actix system messages

prelude

The actix prelude

registry

Actors registry

sync

Sync actors support

utils

Structs

ActorResponse

Helper type for representing different type of message responses

Addr

Address of the actor

Arbiter

Event loop controller

Context

Actor execution context

MessageResult

Helper type that implements MessageResponse trait

Recipient

Subscriber type allows to send one specific message to an actor.

Response

Helper type for representing different type of message responses

SpawnHandle

Spawned future handle. Could be used for cancelling spawned future.

Supervisor

Actor supervisor

Syn

Sync destination of the actor. Actor can run in different thread

System

System is an actor which manages process.

SystemRunner

Helper object that runs System's event loop

Unsync

Unsync destination of the actor

Enums

ActorState

Actor execution state

MailboxError

Set of error that can occurred during message delivery process

Running

Traits

Actor

Actors are objects which encapsulate state and behavior.

ActorAddress

Trait give access to actor's address

ActorContext

Actor execution context

AsyncContext

Asynchronous execution context

Handler

Message handler

Message

Message type

StreamHandler

Stream handler

Supervised

Actors with ability to restart after failure

Type Definitions

ResponseActFuture

A specialized actor future for async message handler

ResponseFuture

A specialized future for async message handler