Node

Struct Node 

Source
pub struct Node { /* private fields */ }
Expand description

Node state

Trait Implementations§

Source§

impl AknShutdown<Node> for ClusterHandle

Source§

fn aknowledge_shutdown<'async_trait>( self, _state: Node, _status: Result<(), Need>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,

Child aknowledging shutdown for its supervisor
Source§

impl EventLoop<ClusterHandle> for Node

Source§

fn event_loop<'life0, 'life1, 'async_trait>( &'life0 mut self, _status: Result<(), Need>, supervisor: &'life1 mut Option<ClusterHandle>, ) -> Pin<Box<dyn Future<Output = Result<(), Need>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl Init<ClusterHandle> for Node

Source§

fn init<'life0, 'life1, 'async_trait>( &'life0 mut self, status: Result<(), Need>, supervisor: &'life1 mut Option<ClusterHandle>, ) -> Pin<Box<dyn Future<Output = Result<(), Need>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl Name for Node

impl name of the Node

Source§

fn set_name(self) -> Self

Source§

fn get_name(&self) -> String

Source§

impl Terminating<ClusterHandle> for Node

Source§

fn terminating<'life0, 'life1, 'async_trait>( &'life0 mut self, status: Result<(), Need>, supervisor: &'life1 mut Option<ClusterHandle>, ) -> Pin<Box<dyn Future<Output = Result<(), Need>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Auto Trait Implementations§

§

impl Freeze for Node

§

impl !RefUnwindSafe for Node

§

impl Send for Node

§

impl Sync for Node

§

impl Unpin for Node

§

impl !UnwindSafe for Node

Blanket Implementations§

Source§

impl<T, H> Actor<H> for T
where T: Name + EventLoop<H> + Init<H> + Terminating<H>, H: Send + 'static + AknShutdown<T>,

Source§

fn spawn<T>(task: T) -> JoinHandle<<T as Future>::Output>
where T: Future + Send + 'static, <T as Future>::Output: Send + 'static,

Source§

fn sleep(duration: Duration) -> Sleep

Source§

fn sleep_until(deadline: Instant) -> Sleep

Source§

fn yield_now() -> YieldNow

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, H> End<H> for T
where H: 'static + AknShutdown<T>, T: Actor<H>,

Source§

fn end<'async_trait>( self, status: Result<(), Need>, supervisor: Option<H>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: Send + 'async_trait,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, H> StartActor<H> for T
where H: 'static + AknShutdown<T>, T: Actor<H>,

Source§

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

Source§

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,

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

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

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

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

This method will start the actor after the duration pass
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