2 releases

0.1.1 Nov 7, 2024
0.1.0 Dec 24, 2022

#714 in Parser implementations

Download history 2/week @ 2024-07-29 9/week @ 2024-09-23 121/week @ 2024-11-04 8/week @ 2024-11-11

129 downloads per month

CC0 license

150KB
1.5K SLoC

marc-relators

A crate for serializing and deserializing MARC relators.

A MARC record is a MA-chine Readable Cataloging record. This crate does not attempt to deal with records themselves, only with their relators.

use marc_relators::MarcRelator;

let relator: MarcRelator = "aut".parse().unwrap();
assert_eq!(relator, MarcRelator::Author);

assert_eq!(relator.code(), "aut");
assert_eq!(relator.name(), "Author");
assert_eq!(
    // The full descriptions can be quite long FYI
    &relator.description().as_bytes()[0..102],
    concat!("A person, family, or organization responsible for ",
            "creating a work that is primarily textual in content").as_bytes(),
);

This crate tracks the most current MARC specification. At this time, this is MARC 21.

Intellectual property isn't real. There is no license. If you insist on having one, this is Creative Commons Zero (public domain).

Dependencies

~255–770KB
~18K SLoC