pub struct ProcessStatus { /* private fields */ }Expand description
Plain process status metadata.
Implementations§
Source§impl ProcessStatus
impl ProcessStatus
Sourcepub const fn new(state: ProcessState) -> Self
pub const fn new(state: ProcessState) -> Self
Creates process status metadata for a state.
Sourcepub const fn state(&self) -> ProcessState
pub const fn state(&self) -> ProcessState
Returns the process state.
Sourcepub const fn status_code(&self) -> Option<i32>
pub const fn status_code(&self) -> Option<i32>
Returns the optional numeric status code.
Sourcepub const fn with_status_code(self, status_code: i32) -> Self
pub const fn with_status_code(self, status_code: i32) -> Self
Returns this status with a numeric status code attached.
Sourcepub fn with_message(self, message: impl Into<String>) -> Self
pub fn with_message(self, message: impl Into<String>) -> Self
Returns this status with a message attached.
Trait Implementations§
Source§impl Clone for ProcessStatus
impl Clone for ProcessStatus
Source§fn clone(&self) -> ProcessStatus
fn clone(&self) -> ProcessStatus
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProcessStatus
impl Debug for ProcessStatus
Source§impl Hash for ProcessStatus
impl Hash for ProcessStatus
Source§impl Ord for ProcessStatus
impl Ord for ProcessStatus
Source§fn cmp(&self, other: &ProcessStatus) -> Ordering
fn cmp(&self, other: &ProcessStatus) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ProcessStatus
impl PartialEq for ProcessStatus
Source§fn eq(&self, other: &ProcessStatus) -> bool
fn eq(&self, other: &ProcessStatus) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ProcessStatus
impl PartialOrd for ProcessStatus
impl Eq for ProcessStatus
impl StructuralPartialEq for ProcessStatus
Auto Trait Implementations§
impl Freeze for ProcessStatus
impl RefUnwindSafe for ProcessStatus
impl Send for ProcessStatus
impl Sync for ProcessStatus
impl Unpin for ProcessStatus
impl UnsafeUnpin for ProcessStatus
impl UnwindSafe for ProcessStatus
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