#[non_exhaustive]pub enum PidError {
InvalidValue(u32),
TooLarge(u32),
}Available on crate feature
sys only.Expand description
Error type for PID parsing.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidValue(u32)
Invalid PID value (must be positive)
Process IDs must be positive integers (greater than 0). PID 0 is typically reserved for the kernel or scheduler. This variant contains the invalid value.
TooLarge(u32)
PID too large (platform-dependent)
The provided PID exceeds the maximum valid value for the platform.
On Linux, the maximum is typically 2^31-1 (4,194,303).
On other platforms, it may be u32::MAX.
This variant contains the invalid value.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PidError
impl<'de> Deserialize<'de> for PidError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Error for PidError
Available on crate feature std only.
impl Error for PidError
Available on crate feature
std only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
impl Copy for PidError
impl Eq for PidError
impl StructuralPartialEq for PidError
Auto Trait Implementations§
impl Freeze for PidError
impl RefUnwindSafe for PidError
impl Send for PidError
impl Sync for PidError
impl Unpin for PidError
impl UnwindSafe for PidError
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