Struct isbnid::isbn::ISBN
[−]
[src]
pub struct ISBN { /* fields omitted */ }
Methods
impl ISBN
[src]
fn new(id: &str) -> Result<ISBN, ISBNError>
[src]
Creates a new ISBN number object. It will fail if the encoding is incorrect or if the Bookland is not 978, 979
fn isbn10(&self) -> Result<String, ISBNError>
[src]
Returns the ISBN10 encoding. It will fail if the ISBN13 Bookland is 979 as ISBN10 is only defined for 978
fn isbn13(&self) -> String
[src]
Returns the ISBN13 encoding. The internal encoding is ISBN13 so this will never fail
fn hyphen(&self) -> Result<String, ISBNError>
[src]
Returns a hyphenated ISBN13 number. It will fail if the ISBN number is not registered
fn urn(&self) -> String
[src]
RFC 2888, URN Encoding of ISBN. https://www.ietf.org/rfc/rfc2288
fn doi(&self) -> Result<String, ISBNError>
[src]
Returns doi formated ISBN. It fail if the ISBN number is not registered
fn is_valid(id: &str) -> bool
[src]
Static ISBN format validation