#[non_exhaustive]pub enum Input {
InvalidRange,
}Expand description
A list specifying general categories of input mapping errors.
This list is intended to grow over time and it is not recommended to exhaustively match against it.
It is used with the Error type.
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.
InvalidRange
The range of the requested file or bytes is invalid.
Implementations§
Source§impl Input
impl Input
Sourcepub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
Returns a display message fragment describing the Input type.
The result of as_str is used to Display the Input.
§Examples
use vmap::{Input, Operation};
fn print_input(op: Operation, input: Input) {
println!("failed to {}, {}", op.as_str().unwrap(), input.as_str());
}
// Will print "failed to map file, invalid range"
print_input(Operation::MapFile, Input::InvalidRange);Trait Implementations§
Source§impl Ord for Input
impl Ord for Input
Source§impl PartialOrd for Input
impl PartialOrd for Input
impl Copy for Input
impl Eq for Input
impl StructuralPartialEq for Input
Auto Trait Implementations§
impl Freeze for Input
impl RefUnwindSafe for Input
impl Send for Input
impl Sync for Input
impl Unpin for Input
impl UnwindSafe for Input
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