Trait backstage::actor::StartActor[][src]

pub trait StartActor<H: AknShutdown<Self> + Send + 'static>: Sized + Init<H> + EventLoop<H> + Terminating<H> + End<H> {
    #[must_use]
    fn start<'async_trait>(
        self,
        supervisor: Option<H>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        Self: Send + 'async_trait
, { ... }
#[must_use] fn start_abortable<'async_trait>(
        self,
        abort_registration: AbortRegistration,
        supervisor: Option<H>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        Self: Send + 'async_trait
, { ... }
#[must_use] fn start_timeout<'async_trait>(
        self,
        duration: Duration,
        supervisor: Option<H>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        Self: Send + 'async_trait
, { ... }
#[must_use] fn start_after<'async_trait>(
        self,
        duration: Duration,
        supervisor: Option<H>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        Self: Send + 'async_trait
, { ... } }

Provided methods

#[must_use]
fn start<'async_trait>(
    self,
    supervisor: Option<H>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    Self: Send + 'async_trait, 
[src]

#[must_use]
fn start_abortable<'async_trait>(
    self,
    abort_registration: AbortRegistration,
    supervisor: Option<H>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    Self: Send + 'async_trait, 
[src]

This method will start the actor with abortable event loop by using let (abort_handle, abort_registration) = AbortHandle::new_pair();

#[must_use]
fn start_timeout<'async_trait>(
    self,
    duration: Duration,
    supervisor: Option<H>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    Self: Send + 'async_trait, 
[src]

This method will start the actor with timeout/ttl event loop by using the runtime timer timeout functionality;

#[must_use]
fn start_after<'async_trait>(
    self,
    duration: Duration,
    supervisor: Option<H>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    Self: Send + 'async_trait, 
[src]

This method will start the actor after the duration pass

Loading content...

Implementors

impl<T, H: 'static> StartActor<H> for T where
    T: Actor<H>,
    H: AknShutdown<T>, 
[src]

Loading content...