Struct obsidian_export::Exporter[][src]

pub struct Exporter<'a> { /* fields omitted */ }

Exporter provides the main interface to this library.

Users are expected to create an Exporter using Exporter::new, optionally followed by customization using Exporter::frontmatter_strategy and Exporter::walk_options.

After that, calling Exporter::run will start the export process.

Implementations

impl<'a> Exporter<'a>[src]

pub fn new(source: PathBuf, destination: PathBuf) -> Exporter<'a>[src]

Create a new exporter which reads notes from source and exports these to destination.

pub fn walk_options(&mut self, options: WalkOptions<'a>) -> &mut Exporter<'a>[src]

Set the WalkOptions to be used for this exporter.

pub fn frontmatter_strategy(
    &mut self,
    strategy: FrontmatterStrategy
) -> &mut Exporter<'a>
[src]

Set the FrontmatterStrategy to be used for this exporter.

pub fn process_embeds_recursively(
    &mut self,
    recursive: bool
) -> &mut Exporter<'a>
[src]

Set the behavior when recursive embeds are encountered.

When recursive is true (the default), emdeds are always processed recursively. This may lead to infinite recursion when note A embeds B, but B also embeds A. (When this happens, ExportError::RecursionLimitExceeded will be returned by Exporter::run).

When recursive is false, if a note is encountered for a second time while processing the original note, instead of embedding it again a link to the note is inserted instead.

pub fn run(&mut self) -> Result<(), ExportError>[src]

Export notes using the settings configured on this exporter.

Trait Implementations

impl<'a> Clone for Exporter<'a>[src]

impl<'a> Debug for Exporter<'a>[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for Exporter<'a>[src]

impl<'a> Send for Exporter<'a>[src]

impl<'a> Sync for Exporter<'a>[src]

impl<'a> Unpin for Exporter<'a>[src]

impl<'a> !UnwindSafe for Exporter<'a>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.