fn start(self) -> Addr<Self>
    where
        Self: Actor<Context = Context<Self>>,
    {
        Context::new().run(self)
    }
/// Start a new asynchronous actor, returning its address.
///
/// # Examples
///
/// ```
/// use actix::*;
///
/// struct MyActor;
/// impl Actor for MyActor {
///     type Context = Context<Self>;
/// }
///
/// fn main() {
///     // initialize system
///     System::new().block_on(async {
///         let addr = MyActor.start(); // <- start actor and get its address
/// #       System::current().stop();
///     });
/// }
/// ```
Start a new asynchronous actor, returning its address.
Start a new asynchronous actor returning its address .
fn start(self) -> Addr<Self>
    where
        Self: Actor<Context = Context<Self>>,
    {
        Context::new().run(self)
    }
fn start ( self ) -> Addr < Self > where Self : Actor < Context = Context < Self > > , { Context :: new ( ) . run ( self ) }
Start a new asynchronous actor, returning its address.
Start a new asynchronous actor returning its address .
self
self
examples


struct MyActor;
impl Actor for MyActor {
type Context = Context;
}

fn main() {
initialize system
System::new().block_on(async {
let addr = MyActor.start(); // <- start actor and get its address
struct MyActor ; impl Actor for MyActor { type Context = Context ; } fn main () { initialize system System :: new () . block_on ( async { let addr = MyActor . start () ; // < - start actor and get its address
system::current().stop();
None