Struct yarner_lib::Document [−][src]
A representation of a Document of literate code
Fields
nodes: Vec<Node>The nodes forming the document
newline: StringThe 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]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
__D: Deserializer<'de>,
impl Serialize for Document[src]
Auto Trait Implementations
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnwindSafe for Document
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,