pub enum ActorWorkKind {
Action,
KeepAwake,
InternalKeepAwake,
WaitUntil,
RegisteredTask,
WebSocketCallback,
DisconnectCallback,
}Expand description
Classifies actor work so sleep can apply one policy model across different APIs.
Variants§
Action
Dispatched action work awaiting its reply from the runtime adapter.
KeepAwake
User work that keeps the actor out of idle sleep while it runs.
InternalKeepAwake
Runtime-owned work that should behave like keep-awake without exposing a user API.
WaitUntil
User work that may continue into sleep grace but should not block idle sleep.
RegisteredTask
Detached runtime task that drains during shutdown.
WebSocketCallback
Async WebSocket callback work that must hold sleep while a callback is running.
DisconnectCallback
Disconnect callback work that must finish before sleep or destroy finalizes.
Implementations§
Source§impl ActorWorkKind
impl ActorWorkKind
Sourcepub fn policy(self) -> ActorWorkPolicy
pub fn policy(self) -> ActorWorkPolicy
Returns the lifecycle policy owned by this work kind.
Trait Implementations§
Source§impl Clone for ActorWorkKind
impl Clone for ActorWorkKind
Source§fn clone(&self) -> ActorWorkKind
fn clone(&self) -> ActorWorkKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ActorWorkKind
Source§impl Debug for ActorWorkKind
impl Debug for ActorWorkKind
impl Eq for ActorWorkKind
Source§impl Hash for ActorWorkKind
impl Hash for ActorWorkKind
Source§impl PartialEq for ActorWorkKind
impl PartialEq for ActorWorkKind
impl StructuralPartialEq for ActorWorkKind
Auto Trait Implementations§
impl Freeze for ActorWorkKind
impl RefUnwindSafe for ActorWorkKind
impl Send for ActorWorkKind
impl Sync for ActorWorkKind
impl Unpin for ActorWorkKind
impl UnsafeUnpin for ActorWorkKind
impl UnwindSafe for ActorWorkKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compares
self with key and returns true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.