pub enum InventoryError {
NotFound,
Insufficient,
Internal(String),
InvalidTimeRange,
}Expand description
Represents possible errors that can occur during inventory operations.
Variants§
NotFound
Returned when the requested item does not exist in the repository.
Insufficient
Returned when the requested quantity exceeds the available units.
Internal(String)
A generic internal error with an attached message.
InvalidTimeRange
Returned when the provided time range is invalid, such as when the start time is greater than or equal to the end time.
Trait Implementations§
Source§impl Debug for InventoryError
impl Debug for InventoryError
Source§impl Display for InventoryError
impl Display for InventoryError
Source§impl Error for InventoryError
impl Error for InventoryError
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 PartialEq for InventoryError
impl PartialEq for InventoryError
impl StructuralPartialEq for InventoryError
Auto Trait Implementations§
impl Freeze for InventoryError
impl RefUnwindSafe for InventoryError
impl Send for InventoryError
impl Sync for InventoryError
impl Unpin for InventoryError
impl UnsafeUnpin for InventoryError
impl UnwindSafe for InventoryError
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