Struct actix::System
[−]
[src]
#[must_use = "System must be run"]pub struct System { /* fields omitted */ }
Methods
impl System
[src]
fn get() -> SyncAddress<System>
[src]
This function returns system address.
System::init
has to be called before, otherwise get
function panics.
fn init() -> System
[src]
Initialize system
fn handle(&self) -> &Handle
[src]
Returns handle to current event loop. Same as Arbiter::handle()
fn run(self)
[src]
This function will start tokio event loop and will finish once the SystemExit
get received. Once SystemExit
message get received, process exits with code
encoded in message.
Trait Implementations
impl Actor for System
[src]
fn start(&mut self, ctx: &mut Context<Self>)
[src]
Method is called when actor get polled first time.
fn finished(&mut self, ctx: &mut Context<Self>)
[src]
Method is called when context's stream finishes. By default returns ActorStatus::Done
. Read more
impl MessageHandler<SystemExit> for System
[src]
type Item = ()
The type of value that this message will resolved with if it is successful.
type Error = ()
The type of error that this message will resolve with if it fails in a normal fashion.
type InputError = ()
If message handler is used for handling messages from Future or Stream, then InputError
type has to be set to correspondent Error
Read more
fn handle(
&mut self,
msg: SystemExit,
_: &mut Context<Self>
) -> MessageFuture<Self, SystemExit>
[src]
&mut self,
msg: SystemExit,
_: &mut Context<Self>
) -> MessageFuture<Self, SystemExit>
Method is called for every message received by this Actor
fn error(&mut self, err: Self::InputError, ctx: &mut Context<Self>)
[src]
Method is called on error.