Crate biblatex

Source
Expand description

A crate for parsing Bib(La)TeX files.

The main API entrypoint is the Bibliography struct.

§Example

Finding out the author of a work.

let src = "@book{tolkien1937, author = {J. R. R. Tolkien}}";
let bibliography = Bibliography::parse(src).unwrap();
let entry = bibliography.get("tolkien1937").unwrap();
let author = entry.author().unwrap();
assert_eq!(author[0].name, "Tolkien");

Structs§

Bibliography
A fully parsed bibliography.
Date
A date or a range of dates and their certainty and exactness.
Datetime
Timezone-unaware date and time.
Entry
A bibliography entry containing chunk fields, which can be parsed into more specific types on demand.
Pair
The keys for fields and their values.
ParseError
An error that might occur during initial parsing of the bibliography.
Person
An author, editor, or some other person affiliated with a cited work.
RawBibliography
A literal representation of a bibliography file, with abbreviations not yet resolved.
RawEntry
A raw extracted entry, with abbreviations not yet resolved.
Report
A report of the validity of an Entry. Can be obtained by calling Entry::verify.
Spanned
A value with the span it corresponds to in the source code.
Time
A potentially timezone aware time.
TypeError
An error that may occur while parsing the chunks in a field into a specific Type.

Enums§

Chunk
Represents one part of a field value.
DateValue
A single date or a range of dates.
EditorType
Which role the according editor had.
EntryType
Describes the type of a bibliographical entry.
Gender
Gender of the author or editor (if no author was specified).
Pagination
Defines the pagination scheme to use for formatting purposes.
ParseErrorKind
Error conditions that might occur during initial parsing of the bibliography.
PermissiveType
A value that could be either a typed value or a literal string.
RawChunk
A literal representation of a bibliography entry field.
RetrievalError
Errors that can occur when retrieving a field of an Entry.
TimeOffset
A timezone offset.
Token
A token that can be encountered during parsing.
TypeErrorKind
Error conditions that might occur while parsing the chunks in a field into a specific Type.

Traits§

ChunksExt
Additional methods for chunk slices.
Type
Convert Bib(La)TeX data types from and to chunk slices.

Functions§

parse_colon
Parse a colon.
parse_hyphen
Parse a hyphen.

Type Aliases§

Chunks
A vector of chunks.
ChunksRef
A slice of chunks.
Field
The content of a field or abbreviation.