pub trait Task: AsHandleRef {
// Provided methods
fn kill(&self) -> Result<(), Status> { ... }
fn suspend(&self) -> Result<Handle, Status> { ... }
fn create_exception_channel_with_opts(
&self,
opts: ExceptionChannelOptions,
) -> Result<Channel, Status> { ... }
fn create_exception_channel(&self) -> Result<Channel, Status> { ... }
fn get_runtime_info(&self) -> Result<TaskRuntimeInfo, Status> { ... }
}
Provided Methods§
Sourcefn kill(&self) -> Result<(), Status>
fn kill(&self) -> Result<(), Status>
Kill the given task (job, process, or thread).
Wraps the zx_task_kill syscall.
Sourcefn suspend(&self) -> Result<Handle, Status>
fn suspend(&self) -> Result<Handle, Status>
Suspend the given task
Wraps the zx_task_suspend syscall.
Resume the task by closing the returned handle.
Sourcefn create_exception_channel_with_opts(
&self,
opts: ExceptionChannelOptions,
) -> Result<Channel, Status>
fn create_exception_channel_with_opts( &self, opts: ExceptionChannelOptions, ) -> Result<Channel, Status>
Create an exception channel (with options) for the task.
Wraps the zx_task_create_exception_channel syscall.
Sourcefn create_exception_channel(&self) -> Result<Channel, Status>
fn create_exception_channel(&self) -> Result<Channel, Status>
Create an exception channel for the task.
Wraps the zx_task_create_exception_channel syscall.
Sourcefn get_runtime_info(&self) -> Result<TaskRuntimeInfo, Status>
fn get_runtime_info(&self) -> Result<TaskRuntimeInfo, Status>
Returns the runtime information for the task.
Wraps the
zx_object_get_info syscall with ZX_INFO_TASK_RUNTIME
as the topic.