mm1_node::runtime

Struct ActorContext

Source
pub struct ActorContext { /* private fields */ }

Trait Implementations§

Source§

impl Call<Address, AnyMessage> for ActorContext

Source§

type Outcome = Result<(), ErrorOf<TellErrorKind>>

Source§

async fn call(&mut self, to: Address, msg: AnyMessage) -> Self::Outcome

Source§

impl Call<Local, Exit> for ActorContext

Source§

type Outcome = bool

Source§

async fn call(&mut self, _to: Local, msg: Exit) -> Self::Outcome

Source§

impl Call<Local, InitAck> for ActorContext

Source§

type Outcome = ()

Source§

async fn call(&mut self, _to: Local, message: InitAck) -> Self::Outcome

Source§

impl Call<Local, Kill> for ActorContext

Source§

type Outcome = bool

Source§

async fn call(&mut self, _to: Local, message: Kill) -> Self::Outcome

Source§

impl Call<Local, Link> for ActorContext

Source§

type Outcome = ()

Source§

async fn call(&mut self, _to: Local, message: Link) -> Self::Outcome

Source§

impl Call<Local, SpawnRequest<Local>> for ActorContext

Source§

type Outcome = Result<Address, ErrorOf<SpawnErrorKind>>

Source§

async fn call( &mut self, _to: Local, message: SpawnRequest<Local>, ) -> Self::Outcome

Source§

impl Call<Local, TrapExit> for ActorContext

Source§

type Outcome = ()

Source§

async fn call(&mut self, _to: Local, message: TrapExit) -> Self::Outcome

Source§

impl Call<Local, Unlink> for ActorContext

Source§

type Outcome = ()

Source§

async fn call(&mut self, _to: Local, message: Unlink) -> Self::Outcome

Source§

impl Call<Local, Unwatch> for ActorContext

Source§

type Outcome = ()

Source§

async fn call(&mut self, _to: Local, msg: Unwatch) -> Self::Outcome

Source§

impl Call<Local, Watch> for ActorContext

Source§

type Outcome = WatchRef

Source§

async fn call(&mut self, _to: Local, msg: Watch) -> Self::Outcome

Source§

impl Drop for ActorContext

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Fork for ActorContext

Source§

async fn fork(&mut self) -> Result<Self, ErrorOf<ForkErrorKind>>

Source§

async fn run<F, Fut>(self, fun: F)
where F: FnOnce(Self) -> Fut + Send + 'static, Fut: Future + Send + 'static,

Source§

impl Quit for ActorContext

Source§

async fn quit_ok(&mut self) -> Never

Source§

async fn quit_err<E>(&mut self, reason: E) -> Never
where E: Error + Send + Sync + 'static,

Source§

fn quit<E>( &mut self, result: Result<(), E>, ) -> impl Future<Output = Infallible> + Send
where E: Error + Send + Sync + 'static,

Source§

impl Recv for ActorContext

Source§

fn address(&self) -> Address

Source§

async fn recv(&mut self) -> Result<Envelope, ErrorOf<RecvErrorKind>>

Source§

async fn close(&mut self)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Ask for T
where T: Tell + Fork + Recv,

Source§

fn ask<Req>( &mut self, to: Address, make_request: impl FnOnce(Address) -> Req + Send, ) -> impl Future<Output = Result<Envelope, ErrorOf<AskErrorKind>>> + Send
where Req: Send + 'static,

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<Sys, T> InitDone<Sys> for T
where T: Call<Sys, InitAck, Outcome = ()>, Sys: System + Default,

Source§

fn init_done(&mut self, address: Address) -> impl Future<Output = ()> + Send

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<Sys, T> Linking<Sys> for T
where T: Call<Sys, Unlink, Outcome = (), Outcome = (), Outcome = ()> + Call<Sys, TrapExit> + Call<Sys, Link>, Sys: System,

Source§

fn set_trap_exit(&mut self, enable: bool) -> impl Future<Output = ()> + Send
where Sys: Default,

Source§

impl<Sys, T> Start<Sys> for T
where T: Recv + Fork + Call<Sys, SpawnRequest<Sys>, Outcome = Result<Address, ErrorOf<SpawnErrorKind>>, Outcome = bool, Outcome = ()> + Call<Sys, Kill> + Call<Sys, Link> + Tell, Sys: System,

Source§

fn spawn( &mut self, runnable: <Sys as System>::Runnable, link: bool, ) -> impl Future<Output = Result<Address, ErrorOf<SpawnErrorKind>>> + Send

Source§

fn start( &mut self, runnable: <Sys as System>::Runnable, link: bool, start_timeout: Duration, ) -> impl Future<Output = Result<Address, ErrorOf<StartErrorKind>>> + Send

Source§

impl<Sys, T> Stop<Sys> for T
where T: Call<Sys, Exit, Outcome = bool, Outcome = bool> + Call<Sys, Kill>, Sys: System,

Source§

fn shutdown( &mut self, peer: Address, stop_timeout: Duration, ) -> impl Future<Output = Result<(), ErrorOf<ShutdownErrorKind>>> + Send
where Sys: Default, Self: Watching<Sys> + Fork + Recv,

Source§

fn exit(&mut self, peer: Address) -> impl Future<Output = bool> + Send
where Sys: Default,

Source§

fn kill(&mut self, peer: Address) -> impl Future<Output = bool> + Send
where Sys: Default,

Source§

impl<T> Tell for T

Source§

fn tell<M>( &mut self, to: Address, msg: M, ) -> impl Future<Output = Result<(), ErrorOf<TellErrorKind>>> + Send
where M: Any + Send + 'static,

Source§

impl<T, To, Msg, Ok, Err> TryCall<To, Msg> for T
where T: Call<To, Msg, Outcome = Result<Ok, Err>>, To: Send, Msg: Send, Ok: Send, Err: Send,

Source§

type CallError = Err

Source§

type CallOk = Ok

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<Sys, T> Watching<Sys> for T
where T: Call<Sys, Watch, Outcome = WatchRef, Outcome = ()> + Call<Sys, Unwatch>, Sys: System,

Source§

fn watch(&mut self, peer: Address) -> impl Future<Output = WatchRef> + Send
where Sys: Default,

Source§

fn unwatch(&mut self, wait_ref: WatchRef) -> impl Future<Output = ()> + Send
where Sys: Default,

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> Message for T
where T: Send + 'static,