pub struct ExecutionController { /* private fields */ }
Expand description
A controller used to influence and observe a specific execution of a component. The component
will be stopped when this is dropped if it is still running from the start
call that created
this controller. If the component has already stopped, or even been restarted by some other
action, then dropping this will do nothing.
Implementations§
Source§impl ExecutionController
impl ExecutionController
Sourcepub async fn stop(self) -> Result<StoppedPayload, Error>
pub async fn stop(self) -> Result<StoppedPayload, Error>
Initiates a stop action and waits for the component to stop. If the component has already stopped, then this will immediately return the stopped payload.
Sourcepub async fn wait_for_stop(self) -> Result<StoppedPayload, Error>
pub async fn wait_for_stop(self) -> Result<StoppedPayload, Error>
Waits for the current execution of the component to stop.
Auto Trait Implementations§
impl Freeze for ExecutionController
impl !RefUnwindSafe for ExecutionController
impl Send for ExecutionController
impl Sync for ExecutionController
impl Unpin for ExecutionController
impl !UnwindSafe for ExecutionController
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