pub struct FrontMatter { /* private fields */ }Implementations§
Source§impl FrontMatter
impl FrontMatter
pub fn new(fields: Vec<(String, String)>) -> Self
pub fn fields(&self) -> &[(String, String)]
pub fn get(&self, key: &str) -> Option<&str>
pub fn set(&mut self, key: impl Into<String>, value: impl Into<String>)
pub fn remove(&mut self, key: &str) -> Option<String>
pub fn merge_missing_from(&mut self, other: &FrontMatter)
pub fn to_note_text(&self, body: &str) -> String
pub fn to_map(&self) -> BTreeMap<String, FrontMatterValue>
Trait Implementations§
Source§impl Clone for FrontMatter
impl Clone for FrontMatter
Source§fn clone(&self) -> FrontMatter
fn clone(&self) -> FrontMatter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FrontMatter
impl Debug for FrontMatter
Source§impl Display for FrontMatter
impl Display for FrontMatter
Source§impl PartialEq for FrontMatter
impl PartialEq for FrontMatter
impl Eq for FrontMatter
impl StructuralPartialEq for FrontMatter
Auto Trait Implementations§
impl Freeze for FrontMatter
impl RefUnwindSafe for FrontMatter
impl Send for FrontMatter
impl Sync for FrontMatter
impl Unpin for FrontMatter
impl UnsafeUnpin for FrontMatter
impl UnwindSafe for FrontMatter
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