pub struct ParsedDocument<'a> { /* private fields */ }Expand description
Rich parsed document for tooling-grade bibliography workflows.
Implementations§
Source§impl<'a> ParsedDocument<'a>
impl<'a> ParsedDocument<'a>
Sourcepub fn from_library(library: Library<'a>) -> Self
pub fn from_library(library: Library<'a>) -> Self
Build a parsed document from the existing structured library model.
Sourcepub fn into_library(self) -> Library<'a>
pub fn into_library(self) -> Library<'a>
Consume this document and return the compact structured library view.
Sourcepub fn sources(&self) -> &[ParsedSource<'a>]
pub fn sources(&self) -> &[ParsedSource<'a>]
Return source metadata.
Sourcepub fn entries(&self) -> &[ParsedEntry<'a>]
pub fn entries(&self) -> &[ParsedEntry<'a>]
Return parsed entries.
Sourcepub fn entries_mut(&mut self) -> &mut [ParsedEntry<'a>]
pub fn entries_mut(&mut self) -> &mut [ParsedEntry<'a>]
Return mutable parsed entries.
Sourcepub fn entry_mut_by_key(&mut self, key: &str) -> Option<&mut ParsedEntry<'a>>
pub fn entry_mut_by_key(&mut self, key: &str) -> Option<&mut ParsedEntry<'a>>
Return a mutable entry by citation key.
Sourcepub fn rename_key(&mut self, old: &str, new: impl Into<Cow<'a, str>>) -> bool
pub fn rename_key(&mut self, old: &str, new: impl Into<Cow<'a, str>>) -> bool
Rename a citation key.
Sourcepub fn remove_export_fields(&mut self, names: &[&str]) -> usize
pub fn remove_export_fields(&mut self, names: &[&str]) -> usize
Remove configured export-only fields from all entries.
Sourcepub fn strings(&self) -> &[ParsedString<'a>]
pub fn strings(&self) -> &[ParsedString<'a>]
Return parsed string definitions.
Sourcepub fn preambles(&self) -> &[ParsedPreamble<'a>]
pub fn preambles(&self) -> &[ParsedPreamble<'a>]
Return parsed preambles.
Sourcepub fn comments(&self) -> &[ParsedComment<'a>]
pub fn comments(&self) -> &[ParsedComment<'a>]
Return parsed comments.
Sourcepub fn failed_blocks(&self) -> &[ParsedFailedBlock<'a>]
pub fn failed_blocks(&self) -> &[ParsedFailedBlock<'a>]
Return failed blocks retained by tolerant parsing.
Sourcepub fn blocks(&self) -> &[ParsedBlock]
pub fn blocks(&self) -> &[ParsedBlock]
Return source-order blocks.
Sourcepub fn diagnostics(&self) -> &[Diagnostic]
pub fn diagnostics(&self) -> &[Diagnostic]
Return document diagnostics.
Sourcepub const fn status(&self) -> ParseStatus
pub const fn status(&self) -> ParseStatus
Return the document parse status.
Sourcepub fn summary(&self) -> ParseSummary
pub fn summary(&self) -> ParseSummary
Return summary counts for the parsed document.
Sourcepub fn expand_value(
&self,
value: &Value<'a>,
options: ExpansionOptions,
) -> Result<String>
pub fn expand_value( &self, value: &Value<'a>, options: ExpansionOptions, ) -> Result<String>
Expand a parsed value using this document’s string definitions.
This allocates the expanded text. The structured value itself remains
unchanged, and unresolved-variable behavior follows options.
Sourcepub fn into_owned(self) -> ParsedDocument<'static>
pub fn into_owned(self) -> ParsedDocument<'static>
Convert this parsed document into an owned value.
Trait Implementations§
Source§impl<'a> Clone for ParsedDocument<'a>
impl<'a> Clone for ParsedDocument<'a>
Source§fn clone(&self) -> ParsedDocument<'a>
fn clone(&self) -> ParsedDocument<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for ParsedDocument<'a>
impl<'a> RefUnwindSafe for ParsedDocument<'a>
impl<'a> Send for ParsedDocument<'a>
impl<'a> Sync for ParsedDocument<'a>
impl<'a> Unpin for ParsedDocument<'a>
impl<'a> UnsafeUnpin for ParsedDocument<'a>
impl<'a> UnwindSafe for ParsedDocument<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more