Struct PidSet

Source
pub struct PidSet { /* private fields */ }
Expand description

Manages a set of PIDs and their corresponding epoll file descriptors.

Implementations§

Source§

impl PidSet

Source

pub fn new<P: IntoIterator<Item = u32>>(pids: P) -> Self

Creates a new PidSet with the specified PIDs.

§Arguments
  • pids - An iterator over the PIDs to monitor.
Source§

impl PidSet

Source

pub fn wait_all(&mut self) -> Result<(), PidSetError>

Waits for all PIDs to exit.

§Errors

Returns PidSetError if an error occurs during the wait.

Source

pub fn wait_any(&mut self) -> Result<(), PidSetError>

Waits for any one PID to exit.

§Errors

Returns PidSetError if an error occurs during the wait.

Source

pub fn close(self) -> Result<(), PidSetError>

Closes the epoll file descriptor and cleans up the PidSet.

§Errors

Returns PidSetError if an error occurs while closing the epoll file descriptor.

Auto Trait Implementations§

§

impl Freeze for PidSet

§

impl RefUnwindSafe for PidSet

§

impl Send for PidSet

§

impl Sync for PidSet

§

impl Unpin for PidSet

§

impl UnwindSafe for PidSet

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>,

Source§

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>,

Source§

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.