pub struct Operation { /* private fields */ }Expand description
Hold this to read events; drop to cancel (SIGTERM → 5s → SIGKILL).
Implementations§
Source§impl Operation
impl Operation
pub fn events_mut(&mut self) -> &mut EventStream
Sourcepub fn take_cancel(&mut self) -> Option<CancelHandle>
pub fn take_cancel(&mut self) -> Option<CancelHandle>
Dropping the Operation after taking still fires cancel via [DropGuard].
Sourcepub async fn await_completion(self) -> Result<(), GuixError>
pub async fn await_completion(self) -> Result<(), GuixError>
Error precedence on non-zero exit: KnownBug > Polkit (pkexec
reserved codes only) > OperationFailed. Stream ending without
an ExitSummary returns Cancelled.
Auto Trait Implementations§
impl Freeze for Operation
impl !RefUnwindSafe for Operation
impl Send for Operation
impl !Sync for Operation
impl Unpin for Operation
impl UnsafeUnpin for Operation
impl !UnwindSafe for Operation
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