pub struct Isbn13 { /* fields omitted */ }
pub fn new( a: u8, b: u8, c: u8, d: u8, e: u8, f: u8, g: u8, h: u8, i: u8, j: u8, k: u8, l: u8, m: u8 ) -> IsbnResult<Isbn13> | [src] |
Creates a new ISBN13 code from 13 digits.
use isbn::Isbn13;
let isbn13 = Isbn13::new(9, 7, 8, 1, 4, 9, 2, 0, 6, 7, 6, 6, 5).unwrap();
Hyphenate an ISBN-13 into its parts:
- GS1 Prefix
- Registration group
- Registrant
- Publication
- Check digit
use isbn::Isbn13;
let isbn_13 = Isbn13::new(9, 7, 8, 1, 4, 9, 2, 0, 6, 7, 6, 6, 5).unwrap();
assert_eq!(isbn_13.hyphenate().unwrap().as_str(), "978-1-4920-6766-5");
Retrieve the name of the registration group.
use isbn::Isbn13;
let isbn_13 = Isbn13::new(9, 7, 8, 1, 4, 9, 2, 0, 6, 7, 6, 6, 5).unwrap();
assert_eq!(isbn_13.registration_group(), Ok("English language"));
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
The associated error which can be returned from parsing.
Parses a string s
to return a value of this type. Read more
Feeds this value into the given [Hasher
]. Read more
Feeds a slice of this type into the given [Hasher
]. Read more
Performs copy-assignment from source
. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static