Skip to main content

Actor

Trait Actor 

Source
pub trait Actor {
    // Required methods
    fn address(&self) -> &Address;
    fn turn(&mut self, input: ActorInput) -> Turn;
}
Expand description

The actor contract: one event in, zero or more events out, one turn at a time.

Required Methods§

Source

fn address(&self) -> &Address

The actor’s address.

Source

fn turn(&mut self, input: ActorInput) -> Turn

Handles one input.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§