Struct win32job::Job

source ·
pub struct Job { /* private fields */ }

Implementations§

source§

impl Job

source

pub fn create() -> Result<Self, JobError>

Create an anonymous job object.

source

pub fn create_with_limit_info( info: &ExtendedLimitInfo ) -> Result<Self, JobError>

Create an anonymous job object and sets it’s limit according to info.

source

pub fn handle(&self) -> isize

Return the underlying handle to the job. Note that this handle will be closed once the Job object is dropped.

source

pub fn into_handle(self) -> isize

Return the underlying handle to the job, consuming the job. Note that the handle will NOT be closed, so it is the caller’s responsibly to close it.

source

pub fn query_extended_limit_info(&self) -> Result<ExtendedLimitInfo, JobError>

Return basic and extended limit information for a job object. See also Microsoft Docs.

source

pub fn set_extended_limit_info( &self, info: &ExtendedLimitInfo ) -> Result<(), JobError>

Set the basic and extended limit information for a job object.

source

pub fn assign_process(&self, proc_handle: isize) -> Result<(), JobError>

Assigns a process to the job object. See also Microsoft Docs.

source

pub fn assign_current_process(&self) -> Result<(), JobError>

Assigns the current process to the job object.

source§

impl Job

source

pub fn query_process_id_list(&self) -> Result<Vec<usize>, JobError>

Return all the process identifiers for a job object. If the job is nested, the process identifier list consists of all processes associated with the job and its child jobs.

Trait Implementations§

source§

impl Debug for Job

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for Job

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl Send for Job

source§

impl Sync for Job

Auto Trait Implementations§

§

impl RefUnwindSafe for Job

§

impl Unpin for Job

§

impl UnwindSafe for Job

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.