pub struct CommandContext { /* private fields */ }Expand description
Command execution context for tracking active commands
Implementations§
Source§impl CommandContext
impl CommandContext
pub fn new() -> Self
pub async fn register(&self, id: Uuid, handle: CommandHandle)
pub async fn unregister(&self, id: &Uuid)
pub async fn get(&self, id: &Uuid) -> Option<CommandHandle>
pub async fn cancel(&self, id: &Uuid) -> Result<(), UbiquityError>
pub async fn cancel_all(&self) -> Vec<(Uuid, Result<(), UbiquityError>)>
Auto Trait Implementations§
impl !RefUnwindSafe for CommandContext
impl !UnwindSafe for CommandContext
impl Freeze for CommandContext
impl Send for CommandContext
impl Sync for CommandContext
impl Unpin for CommandContext
impl UnsafeUnpin for CommandContext
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