Trait BorrowedComposer

Source
pub trait BorrowedComposer<'a> {
    // Required methods
    fn check_document(&self) -> bool;
    fn compose_document(&mut self) -> Result<Option<BorrowedValue<'a>>>;
    fn position(&self) -> Position;
    fn reset(&mut self);
}
Expand description

Trait for zero-copy YAML composers

Required Methods§

Source

fn check_document(&self) -> bool

Check if there are more documents available

Source

fn compose_document(&mut self) -> Result<Option<BorrowedValue<'a>>>

Compose the next document with minimal allocations

Source

fn position(&self) -> Position

Get the current position in the stream

Source

fn reset(&mut self)

Reset the composer state

Implementors§