pub struct Writer<W: Write> { /* private fields */ }Expand description
BibTeX writer
Implementations§
Source§impl<W: Write> Writer<W>
impl<W: Write> Writer<W>
Sourcepub const fn with_config(writer: W, config: WriterConfig) -> Self
pub const fn with_config(writer: W, config: WriterConfig) -> Self
Create a new writer with custom configuration
Sourcepub fn config_mut(&mut self) -> &mut WriterConfig
pub fn config_mut(&mut self) -> &mut WriterConfig
Access the writer configuration mutably
Sourcepub fn into_inner(self) -> W
pub fn into_inner(self) -> W
Consume the writer and return the underlying writer
Sourcepub fn write_library(&mut self, library: &Library<'_>) -> Result<()>
pub fn write_library(&mut self, library: &Library<'_>) -> Result<()>
Write a complete library.
Sourcepub fn write_document(&mut self, document: &ParsedDocument<'_>) -> Result<()>
pub fn write_document(&mut self, document: &ParsedDocument<'_>) -> Result<()>
Write a parsed document, reusing retained raw blocks when configured.
Sourcepub fn write_selected_entries(
&mut self,
document: &ParsedDocument<'_>,
keys: &[&str],
) -> Result<()>
pub fn write_selected_entries( &mut self, document: &ParsedDocument<'_>, keys: &[&str], ) -> Result<()>
Write selected parsed-document entries in source order.
Non-entry blocks are skipped. Duplicate keys in keys do not duplicate
output entries.
Sourcepub fn write_entry(&mut self, entry: &Entry<'_>) -> Result<()>
pub fn write_entry(&mut self, entry: &Entry<'_>) -> Result<()>
Write a single entry
Trait Implementations§
Auto Trait Implementations§
impl<W> Freeze for Writer<W>where
W: Freeze,
impl<W> RefUnwindSafe for Writer<W>where
W: RefUnwindSafe,
impl<W> Send for Writer<W>where
W: Send,
impl<W> Sync for Writer<W>where
W: Sync,
impl<W> Unpin for Writer<W>where
W: Unpin,
impl<W> UnsafeUnpin for Writer<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for Writer<W>where
W: UnwindSafe,
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
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>
Converts
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>
Converts
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