Enum ForkResult

enum ForkResult

Represents the successful result of calling fork

When fork is called, the process continues execution in the parent process and in the new child. This return type can be examined to determine whether you are now executing in the parent process or in the child.

Variants

Parent { child: Pid }

This is the parent process of the fork.

Child

This is the child process of the fork.

Implementations

impl ForkResult

fn is_child(self: Self) -> bool

Return true if this is the child process of the fork()

fn is_parent(self: Self) -> bool

Returns true if this is the parent process of the fork()

impl Clone for ForkResult

fn clone(self: &Self) -> ForkResult

impl Copy for ForkResult

impl Debug for ForkResult

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

impl Freeze for ForkResult

impl RefUnwindSafe for ForkResult

impl Send for ForkResult

impl Sync for ForkResult

impl Unpin for ForkResult

impl UnsafeUnpin for ForkResult

impl UnwindSafe for ForkResult

impl<T> Any for ForkResult

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for ForkResult

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for ForkResult

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

impl<T> CloneToUninit for ForkResult

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for ForkResult

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for ForkResult

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for ForkResult

fn into(self: Self) -> U

Calls U::from(self).

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

impl<T, U> TryFrom for ForkResult

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

impl<T, U> TryInto for ForkResult

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