zx

Trait Task

Source
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§

Source

fn kill(&self) -> Result<(), Status>

Kill the given task (job, process, or thread).

Wraps the zx_task_kill syscall.

Source

fn suspend(&self) -> Result<Handle, Status>

Suspend the given task

Wraps the zx_task_suspend syscall.

Resume the task by closing the returned handle.

Source

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.

Source

fn create_exception_channel(&self) -> Result<Channel, Status>

Create an exception channel for the task.

Wraps the zx_task_create_exception_channel syscall.

Source

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.

Implementors§