pub struct ToolHandles<T> { /* private fields */ }Implementations§
Source§impl<T> ToolHandles<T>
impl<T> ToolHandles<T>
pub const fn new() -> Self
pub fn insert(&self, state: T) -> StepHandle
Sourcepub fn insert_with_cancel(
&self,
state: T,
cancelled: Arc<AtomicBool>,
) -> StepHandle
pub fn insert_with_cancel( &self, state: T, cancelled: Arc<AtomicBool>, ) -> StepHandle
Share the cancellation flag with a worker started by the plugin.
Sourcepub fn get(&self, handle: StepHandle) -> Option<Arc<ToolState<T>>>
pub fn get(&self, handle: StepHandle) -> Option<Arc<ToolState<T>>>
Unknown, null, removed, or another registry’s handles return None.
pub fn cancel(&self, handle: StepHandle)
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for ToolHandles<T>
impl<T> RefUnwindSafe for ToolHandles<T>
impl<T> Send for ToolHandles<T>
impl<T> Sync for ToolHandles<T>
impl<T> Unpin for ToolHandles<T>
impl<T> UnsafeUnpin for ToolHandles<T>
impl<T> UnwindSafe for ToolHandles<T>
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