pub enum ParseError {
Decimal(String),
Currency(String),
Date(String),
Device(String),
Account(String),
Document(String),
Party(String),
Country(String),
TaxCode(String),
Hash(String),
}Expand description
A value in the protocol that could not be read.
Variants§
Decimal(String)
A decimal number not in its one form, or with more than Decimal::MAX_SCALE places.
Currency(String)
A currency code that is neither three upper-case letters (ISO 4217) nor x- and a name.
Date(String)
A date that is not a valid YYYY-MM-DD.
Device(String)
A device name that is not 1–64 characters of a-z, 0-9 and -.
Account(String)
An account identity that is not a UUID in lower case (8-4-4-4-12 hexadecimal digits).
Document(String)
A document identity that is not a UUID in lower case.
Party(String)
A party identity that is not a UUID in lower case.
Country(String)
A country that is not two upper-case letters (ISO 3166-1 alpha-2).
TaxCode(String)
A tax code that is not a country in lower case, - and a name.
Hash(String)
A hash that is not sha256: and 64 lower-case hexadecimal digits.
Trait Implementations§
Source§impl Clone for ParseError
impl Clone for ParseError
Source§fn clone(&self) -> ParseError
fn clone(&self) -> ParseError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ParseError
impl Debug for ParseError
Source§impl Display for ParseError
impl Display for ParseError
impl Eq for ParseError
Source§impl Error for ParseError
impl Error for ParseError
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 ParseError
impl PartialEq for ParseError
impl StructuralPartialEq for ParseError
Auto Trait Implementations§
impl Freeze for ParseError
impl RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnsafeUnpin for ParseError
impl UnwindSafe for ParseError
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