pub struct Job { /* private fields */ }
Implementations§
source§impl Job
impl Job
sourcepub fn create_with_limit_info(
info: &ExtendedLimitInfo
) -> Result<Self, JobError>
pub fn create_with_limit_info( info: &ExtendedLimitInfo ) -> Result<Self, JobError>
Create an anonymous job object and sets it’s limit according to info
.
sourcepub fn handle(&self) -> isize
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.
sourcepub fn into_handle(self) -> isize
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.
sourcepub fn query_extended_limit_info(&self) -> Result<ExtendedLimitInfo, JobError>
pub fn query_extended_limit_info(&self) -> Result<ExtendedLimitInfo, JobError>
Return basic and extended limit information for a job object. See also Microsoft Docs.
sourcepub fn set_extended_limit_info(
&self,
info: &ExtendedLimitInfo
) -> Result<(), JobError>
pub fn set_extended_limit_info( &self, info: &ExtendedLimitInfo ) -> Result<(), JobError>
Set the basic and extended limit information for a job object.
sourcepub fn assign_process(&self, proc_handle: isize) -> Result<(), JobError>
pub fn assign_process(&self, proc_handle: isize) -> Result<(), JobError>
Assigns a process to the job object. See also Microsoft Docs.
sourcepub fn assign_current_process(&self) -> Result<(), JobError>
pub fn assign_current_process(&self) -> Result<(), JobError>
Assigns the current process to the job object.
Trait Implementations§
Auto Trait Implementations§
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more