Enum cusip::CUSIPError[][src]

#[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,
    },
}

All the ways parsing could fail.

Variants (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).

Fields of InvalidCUSIPLength

was: usize

The length we found

InvalidPayloadLength

The Payload length is not exactly 8 bytes (checked when building).

Fields of InvalidPayloadLength

was: usize

The length we found

InvalidIssuerNumLength

The Issuer Number length is not exactly 6 bytes (checked when building).

Fields of InvalidIssuerNumLength

was: usize

The length we found

InvalidIssueNumLength

The Issue Number length is not exactly 6 bytes (checked when building).

Fields of InvalidIssueNumLength

was: usize

The length we found

InvalidIssuerNum

The input issuer id is not six uppercase ASCII alphanumeric characters (checked when parsing or building).

Fields of InvalidIssuerNum

was: [u8; 6]

The Issuer Number we found

InvalidIssueNum

The input issue id is not two uppercase ASCII alphanumeric characters (checked when parsing or building).

Fields of InvalidIssueNum

was: [u8; 2]

The Issue Number we found

InvalidCheckDigit

The input check digit is not a single ASCII decimal digit character (checked when parsing).

Fields of InvalidCheckDigit

was: u8

The Check Digit we found

IncorrectCheckDigit

The input check digit has in a valid format, but has an incorrect value (checked when parsing).

Fields of IncorrectCheckDigit

was: u8

The Check Digit we found

expected: u8

The Check Digit we expected

Trait Implementations

impl Clone for CUSIPError[src]

impl Debug for CUSIPError[src]

impl Display for CUSIPError[src]

impl Eq for CUSIPError[src]

impl Error for CUSIPError[src]

impl PartialEq<CUSIPError> for CUSIPError[src]

impl StructuralEq for CUSIPError[src]

impl StructuralPartialEq for CUSIPError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.