Type Alias obsidian_export::Frontmatter

source ·
pub type Frontmatter = Mapping;
Expand description

YAML front matter from an Obsidian note.

This is essentially an alias of serde_yaml::Mapping so all the methods available on that type are available with Frontmatter as well.

Examples

use serde_yaml::Value;

let mut frontmatter = Frontmatter::new();
let key = Value::String("foo".to_string());

frontmatter.insert(
    key.clone(),
    Value::String("bar".to_string()),
);

assert_eq!(
    frontmatter.get(&key),
    Some(&Value::String("bar".to_string())),
)

Aliased Type§

struct Frontmatter { /* private fields */ }