#[non_exhaustive]pub enum StampError {
InvalidArxivId(ArticleIdError),
InvalidDate,
InvalidCategory,
NotEnoughComponents,
}Expand description
An error that can occur when parsing and validating arXiv stamps
§Examples
use arxiv::Stamp;
let stamp = Stamp::try_from("arXiv:2001.00001 [cs.LG] 1 Jan 2000");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.
Trait Implementations§
Source§impl Clone for StampError
impl Clone for StampError
Source§fn clone(&self) -> StampError
fn clone(&self) -> StampError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StampError
impl Debug for StampError
Source§impl Display for StampError
impl Display for StampError
Source§impl Error for StampError
impl Error for StampError
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 StampError
impl PartialEq for StampError
impl Copy for StampError
impl Eq for StampError
impl StructuralPartialEq for StampError
Auto Trait Implementations§
impl Freeze for StampError
impl RefUnwindSafe for StampError
impl Send for StampError
impl Sync for StampError
impl Unpin for StampError
impl UnwindSafe for StampError
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