pub struct CutterLoc { /* private fields */ }Expand description
Represents a generated Library of Congress (LoC) Cutter number.
LoC Cutters always consist of a single initial alphabetic character
followed by a numeric sequence derived from character-branching rules.
The Display implementation outputs the standard concatenated format
(e.g. C378 or A153).
Implementations§
Source§impl CutterLoc
impl CutterLoc
Sourcepub fn new(alpha_prefix: char, numeric: CutterNumType) -> CutterLoc
pub fn new(alpha_prefix: char, numeric: CutterNumType) -> CutterLoc
Creates a new CutterLoc instance.
§Examples
let loc_cutter = CutterLoc::new('C', 378);
assert_eq!(loc_cutter.to_string(), "C378");Sourcepub fn alpha_prefix(&self) -> char
pub fn alpha_prefix(&self) -> char
Returns the initial letter of the Cutter number.
Sourcepub fn numeric(&self) -> CutterNumType
pub fn numeric(&self) -> CutterNumType
Returns the numeric portion of the Cutter number.
Trait Implementations§
impl Copy for CutterLoc
impl CutterType for CutterLoc
impl Eq for CutterLoc
impl StructuralPartialEq for CutterLoc
Auto Trait Implementations§
impl Freeze for CutterLoc
impl RefUnwindSafe for CutterLoc
impl Send for CutterLoc
impl Sync for CutterLoc
impl Unpin for CutterLoc
impl UnsafeUnpin for CutterLoc
impl UnwindSafe for CutterLoc
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