ActorContext

Struct ActorContext 

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

Trait Implementations§

Source§

impl Bind<NetAddress> for ActorContext

Source§

async fn bind( &mut self, args: BindArgs<NetAddress>, ) -> Result<(), ErrorOf<BindErrorKind>>

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 InitDone for ActorContext

Source§

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

Source§

impl Linking for ActorContext

Source§

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

Source§

impl Messaging for ActorContext

Source§

fn address(&self) -> Address

Source§

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

Source§

async fn close(&mut self)

Source§

fn send( &mut self, envelope: Envelope, ) -> impl Future<Output = Result<(), ErrorOf<SendErrorKind>>> + Send

Source§

fn forward( &mut self, to: Address, envelope: Envelope, ) -> impl Future<Output = Result<(), ErrorOf<SendErrorKind>>> + Send

Source§

impl Now for ActorContext

Source§

type Instant = Instant

Source§

fn now(&self) -> Self::Instant

Source§

impl Ping for ActorContext

Source§

async fn ping( &mut self, address: Address, timeout: Duration, ) -> Result<Duration, ErrorOf<PingErrorKind>>

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 Start<BoxedRunnable<ActorContext>> for ActorContext

Source§

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

Source§

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

Source§

impl Stop for ActorContext

Source§

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

Source§

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

Source§

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

Source§

impl Watching for ActorContext

Source§

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

Source§

fn unwatch(&mut self, watch_ref: WatchRef) -> impl Future<Output = ()> + Send

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> 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<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<T> Tell for T
where T: Messaging,

Source§

fn tell<M>( &mut self, to: Address, message: M, ) -> impl Future<Output = Result<(), ErrorOf<SendErrorKind>>> + Send
where M: Message,

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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