Struct shtola::ShFile [−][src]
Expand description
Shtola’s file representation, with frontmatter included.
Fields
frontmatter: Value
The frontmatter.
content: Vec<u8>
The file contents (without frontmatter).
Implementations
Creates an empty ShFile. Useful for deleting files using
HashMap::difference
:
use shtola::{Plugin, RefIR, ShFile, HashMap}; use std::path::PathBuf; fn plugin() -> Plugin { Box::new(|mut ir: RefIR| { ir.files.insert("empty-file.md".into(), ShFile::empty()); }) }
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ShFile
impl UnwindSafe for ShFile
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V