marc-relators

Crates.iomarc-relators
lib.rsmarc-relators
version0.1.1
sourcesrc
created_at2022-12-24 08:42:03.754963
updated_at2024-11-07 12:29:04.33927
descriptionParsing and de/serialization for MARC relators
homepage
repositoryhttps://gitlab.com/anarchist-archive/marc-relators
max_upload_size
id744876
size191,829
(anarchist-archive)

documentation

README

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.

Anti-Copyright

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

Commit count: 3

cargo fmt