pub struct Job(/* private fields */);Expand description
An object representing a Zircon job.
As essentially a subtype of NullableHandle, it can be freely interconverted.
Implementations§
Source§impl Job
impl Job
Sourcepub fn into_raw(self) -> zx_handle_t
pub fn into_raw(self) -> zx_handle_t
Return the raw handle’s integer value without closing it when self is dropped.
Sourcepub fn duplicate(&self, rights: Rights) -> Result<Self, Status>
pub fn duplicate(&self, rights: Rights) -> Result<Self, Status>
Wraps the
zx_handle_duplicate
syscall.
Sourcepub fn replace(self, rights: Rights) -> Result<Self, Status>
pub fn replace(self, rights: Rights) -> Result<Self, Status>
Wraps the
zx_handle_replace
syscall.
Sourcepub fn signal(
&self,
clear_mask: Signals,
set_mask: Signals,
) -> Result<(), Status>
pub fn signal( &self, clear_mask: Signals, set_mask: Signals, ) -> Result<(), Status>
Wraps the
zx_object_signal
syscall.
Sourcepub fn wait_one(
&self,
signals: Signals,
deadline: MonotonicInstant,
) -> WaitResult
pub fn wait_one( &self, signals: Signals, deadline: MonotonicInstant, ) -> WaitResult
Wraps the
zx_object_wait_one
syscall.
Source§impl Job
impl Job
Sourcepub fn create_child_job(&self) -> Result<Job, Status>
pub fn create_child_job(&self) -> Result<Job, Status>
Create a new job as a child of the current job.
Wraps the zx_job_create syscall.
Sourcepub fn create_child_process(
&self,
options: ProcessOptions,
name: &[u8],
) -> Result<(Process, Vmar), Status>
pub fn create_child_process( &self, options: ProcessOptions, name: &[u8], ) -> Result<(Process, Vmar), Status>
Create a new process as a child of the current job.
On success, returns a handle to the new process and a handle to the root of the new process’s address space.
Wraps the zx_process_create syscall.
Sourcepub fn info(&self) -> Result<JobInfo, Status>
pub fn info(&self) -> Result<JobInfo, Status>
Wraps the zx_object_get_info syscall for the ZX_INFO_JOB topic.
Sourcepub fn set_policy(&self, policy: JobPolicy) -> Result<(), Status>
pub fn set_policy(&self, policy: JobPolicy) -> Result<(), Status>
Wraps the zx_job_set_policy syscall.
Sourcepub fn set_critical(
&self,
opts: JobCriticalOptions,
process: &Process,
) -> Result<(), Status>
pub fn set_critical( &self, opts: JobCriticalOptions, process: &Process, ) -> Result<(), Status>
Wraps the zx_job_set_critical syscall.
Sourcepub fn processes(&self) -> Result<Vec<Koid>, Status>
pub fn processes(&self) -> Result<Vec<Koid>, Status>
Wraps the zx_object_get_info syscall for the ZX_INFO_JOB_PROCESSES topic.
Sourcepub fn children(&self) -> Result<Vec<Koid>, Status>
pub fn children(&self) -> Result<Vec<Koid>, Status>
Wraps the zx_object_get_info syscall for the ZX_INFO_JOB_CHILDREN topic.
Sourcepub fn get_child(
&self,
koid: &Koid,
rights: Rights,
) -> Result<NullableHandle, Status>
pub fn get_child( &self, koid: &Koid, rights: Rights, ) -> Result<NullableHandle, Status>
Wraps the zx_object_get_child syscall.
Trait Implementations§
Source§impl AsHandleRef for Job
impl AsHandleRef for Job
Source§fn as_handle_ref(&self) -> HandleRef<'_>
fn as_handle_ref(&self) -> HandleRef<'_>
object_wait_many.