#[non_exhaustive]pub enum ProcessSampleError {
UnsupportedPlatform {
platform: &'static str,
},
Read {
path: String,
source: Error,
},
InvalidField {
path: String,
field: &'static str,
},
}Expand description
Failure to obtain an exact process-resource snapshot.
§Examples
use ailloli_ui_bench::ProcessSampleError;
let error = ProcessSampleError::UnsupportedPlatform { platform: "example" };
assert!(error.to_string().contains("example"));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.
UnsupportedPlatform
The current platform has no implemented sampler.
Read
A required procfs file or directory could not be read.
InvalidField
A required procfs field was absent, malformed, or overflowed bytes.
Trait Implementations§
Source§impl Debug for ProcessSampleError
impl Debug for ProcessSampleError
Source§impl Display for ProcessSampleError
impl Display for ProcessSampleError
Source§impl Error for ProcessSampleError
impl Error for ProcessSampleError
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()
Auto Trait Implementations§
impl Freeze for ProcessSampleError
impl !RefUnwindSafe for ProcessSampleError
impl Send for ProcessSampleError
impl Sync for ProcessSampleError
impl Unpin for ProcessSampleError
impl !UnwindSafe for ProcessSampleError
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