Struct yarner_lib::Document[][src]

pub struct Document {
    pub nodes: Vec<Node>,
    pub newline: String,
}

A representation of a Document of literate code

Fields

nodes: Vec<Node>

The nodes forming the document

newline: String

The newline character(s) used in the sources

Implementations

impl Document[src]

pub fn new(nodes: Vec<Node>, newline: String) -> Self[src]

Creates a new document with the given nodes

pub fn newline(&self) -> &str[src]

The newline character(s) used in the sources

pub fn code_blocks(&self) -> impl Iterator<Item = &CodeBlock>[src]

Gets all the code blocks of this document

pub fn code_blocks_by_name(&self) -> HashMap<Option<&str>, Vec<&CodeBlock>>[src]

Code blocks, mapped by name

pub fn transclusions(&self) -> impl Iterator<Item = &Transclusion>[src]

Gets all the transclusions of this document

pub fn entry_points(&self) -> HashMap<Option<&str>, (&Path, Option<PathBuf>)>[src]

Finds all file-specific entry points

Trait Implementations

impl Debug for Document[src]

impl<'de> Deserialize<'de> for Document[src]

impl Serialize for Document[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.