[][src]Struct jep106::JEP106Code

pub struct JEP106Code {
    pub id: u8,
    pub cc: u8,
}

A Struct which contains a fully qualified JEP106 manufacturer code.

Fields

id: u8

JEP106 identification code. Points to a manufacturer name in the bank table corresponding to cc.

cc: u8

JEP106 continuation code. This code represents the bank which the manufacturer for a corresponding id has to be looked up.

Methods

impl JEP106Code[src]

pub const fn new(cc: u8, id: u8) -> Self[src]

Creates a new JEP106Code struct from a JEP106 continuation code and a JEP106 id code tuple.

pub const fn get(&self) -> Option<&'static str>[src]

Returns the manufacturer corresponding to a complete JEP106 code.

Returns an empty string if the JEP106 code is unknown.

pub const fn get_raw(cc: u8, id: u8) -> Option<&'static str>[src]

Returns the manufacturer corresponding to a JEP106 continuation code and a JEP106 id code tuple.

Returns an empty string if the JEP106 code is unknown.

Trait Implementations

impl Clone for JEP106Code[src]

impl Copy for JEP106Code[src]

impl Eq for JEP106Code[src]

impl PartialEq<JEP106Code> for JEP106Code[src]

impl Display for JEP106Code[src]

impl Debug for JEP106Code[src]

impl Serialize for JEP106Code[src]

impl<'de> Deserialize<'de> for JEP106Code[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]