ObFileFlush

Trait ObFileFlush 

Source
pub trait ObFileFlush<T = HashMap<String, Value>>: ObFile<T>{
    // Provided methods
    fn flush_content(&self, open_option: &OpenOptions) -> Result<(), Error> { ... }
    fn flush_properties(&self, open_option: &OpenOptions) -> Result<(), Error> { ... }
    fn flush(&self, open_option: &OpenOptions) -> Result<(), Error> { ... }
}
Expand description

Represents an Obsidian note file with frontmatter properties and content for flush to file

To use this trait, T must implement serde::Serialize

Provided Methods§

Source

fn flush_content(&self, open_option: &OpenOptions) -> Result<(), Error>

Flush only content

Ignore if path is None

Source

fn flush_properties(&self, open_option: &OpenOptions) -> Result<(), Error>

Flush only content

Ignore if path is None

Source

fn flush(&self, open_option: &OpenOptions) -> Result<(), Error>

Flush ObFile to [self.path()]

Ignore if path is None

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§