Struct scoped_task::Scoped
source · pub struct Scoped<T: Task = Process>(_);
Expand description
Scoped wrapper for a process or job backed by a Zircon handle.
The process or job is killed when the wrapper goes out of scope or the current process panics. See the module-level documentation for more details.
Implementations§
source§impl<T: Task> Scoped<T>
impl<T: Task> Scoped<T>
sourcepub fn kill(self) -> Result<T, Status>
pub fn kill(self) -> Result<T, Status>
Kills the process, consuming the Scoped wrapper and returning the inner task object.
sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consumes the Scoped wrapper and returns the inner task object. The task will no longer be killed on Drop, but may still be killed on exit.