pub struct ISIN(/* private fields */);
Expand description
An ISIN in confirmed valid format.
You cannot construct an ISIN value manually. This does not compile:
ⓘ
use isin;
let cannot_construct = isin::ISIN([0_u8; 12]);
Implementations§
source§impl ISIN
impl ISIN
sourcepub fn parse_strict<S>(value: S) -> Result<ISIN, Error>where
S: Into<String>,
👎Deprecated since 0.1.7: please use isin::parse
instead
pub fn parse_strict<S>(value: S) -> Result<ISIN, Error>where S: Into<String>,
isin::parse
insteadForwards to crate-level parse()
for backward compatibility. Do not use in new code.
sourcepub fn parse_loose<S>(value: S) -> Result<ISIN, Error>where
S: Into<String>,
👎Deprecated since 0.1.7: please use isin::parse_loose
instead
pub fn parse_loose<S>(value: S) -> Result<ISIN, Error>where S: Into<String>,
isin::parse_loose
insteadForwards to crate-level parse_loose()
for backward compatibility. Do not use in new code.
sourcepub fn value(&self) -> &str
👎Deprecated since 0.1.7: please use to_string
instead
pub fn value(&self) -> &str
to_string
insteadReturn a string representation of the ISIN.
sourcepub fn country_code(&self) -> &str
👎Deprecated since 0.1.8: please use prefix
instead
pub fn country_code(&self) -> &str
prefix
insteadReturn just the Prefix portion of the ISIN.
sourcepub fn basic_code(&self) -> &str
pub fn basic_code(&self) -> &str
Return just the Basic Code portion of the ISIN.
sourcepub fn security_identifier(&self) -> &str
👎Deprecated since 0.1.8: please use basic_code
instead
pub fn security_identifier(&self) -> &str
basic_code
insteadReturn just the Basic Code portion of the ISIN.
sourcepub fn check_digit(&self) -> char
pub fn check_digit(&self) -> char
Return just the Check Digit portion of the ISIN.
Trait Implementations§
source§impl Ord for ISIN
impl Ord for ISIN
source§impl PartialEq for ISIN
impl PartialEq for ISIN
source§impl PartialOrd for ISIN
impl PartialOrd for ISIN
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for ISIN
impl Eq for ISIN
impl StructuralEq for ISIN
impl StructuralPartialEq for ISIN
Auto Trait Implementations§
impl RefUnwindSafe for ISIN
impl Send for ISIN
impl Sync for ISIN
impl Unpin for ISIN
impl UnwindSafe for ISIN
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