Enum cusip::error::CUSIPError
source · #[non_exhaustive]pub enum CUSIPError {
InvalidCUSIPLength {
was: usize,
},
InvalidPayloadLength {
was: usize,
},
InvalidIssuerNumLength {
was: usize,
},
InvalidIssueNumLength {
was: usize,
},
InvalidIssuerNum {
was: [u8; 6],
},
InvalidIssueNum {
was: [u8; 2],
},
InvalidCheckDigit {
was: u8,
},
IncorrectCheckDigit {
was: u8,
expected: u8,
},
}
Expand description
All the ways parsing or building could fail.
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.
InvalidCUSIPLength
The CUSIP length is not exactly 9 bytes (checked when parsing).
InvalidPayloadLength
The Payload length is not exactly 8 bytes (checked when building).
InvalidIssuerNumLength
The Issuer Number length is not exactly 6 bytes (checked when building).
InvalidIssueNumLength
The Issue Number length is not exactly 6 bytes (checked when building).
InvalidIssuerNum
The input issuer id is not six uppercase ASCII alphanumeric characters (checked when parsing or building).
InvalidIssueNum
The input issue id is not two uppercase ASCII alphanumeric characters (checked when parsing or building).
InvalidCheckDigit
The input check digit is not a single ASCII decimal digit character (checked when parsing).
IncorrectCheckDigit
The input check digit has in a valid format, but has an incorrect value (checked when parsing).
Trait Implementations§
source§impl Clone for CUSIPError
impl Clone for CUSIPError
source§fn clone(&self) -> CUSIPError
fn clone(&self) -> CUSIPError
Returns a copy 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 CUSIPError
impl Debug for CUSIPError
source§impl Display for CUSIPError
impl Display for CUSIPError
source§impl Error for CUSIPError
impl Error for CUSIPError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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 CUSIPError
impl PartialEq for CUSIPError
source§fn eq(&self, other: &CUSIPError) -> bool
fn eq(&self, other: &CUSIPError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for CUSIPError
impl StructuralPartialEq for CUSIPError
Auto Trait Implementations§
impl RefUnwindSafe for CUSIPError
impl Send for CUSIPError
impl Sync for CUSIPError
impl Unpin for CUSIPError
impl UnwindSafe for CUSIPError
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