#[non_exhaustive]pub enum VrdError {
GeneralError(&'static str),
}Expand description
Crate-level error type for the vrd library.
This error type is used to represent general failures within the library.
It is kept allocation-free by using static error messages, ensuring it
works correctly in pure no_std environments without requiring an
allocator.
§Examples
use vrd::VrdError;
let err = VrdError::GeneralError("something went wrong");
println!("{}", err);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.
GeneralError(&'static str)
A general error with a static message.
This variant is used for unexpected conditions where a more specific error type isn’t applicable.
Trait Implementations§
Source§impl Error for VrdError
Available on crate feature std only.
impl Error for VrdError
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()
Source§impl Ord for VrdError
impl Ord for VrdError
Source§impl PartialOrd for VrdError
impl PartialOrd for VrdError
impl Copy for VrdError
impl Eq for VrdError
impl StructuralPartialEq for VrdError
Auto Trait Implementations§
impl Freeze for VrdError
impl RefUnwindSafe for VrdError
impl Send for VrdError
impl Sync for VrdError
impl Unpin for VrdError
impl UnsafeUnpin for VrdError
impl UnwindSafe for VrdError
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