quicknotes

Function make_note

Source
pub fn make_note<E: Editor, Tz: TimeZone>(
    config: &NoteConfig,
    editor: E,
    title: String,
    creation_time: &DateTime<Tz>,
) -> Result<Option<PathBuf>, MakeNoteError>
Expand description

Create a new note.

The note will be created in the notes directory, with a name as close to the given title as possible, and then opened in the editor.

Returns the path of the note, or None if nothing was written to the note.

ยงErrors

Returns an error if there is an I/O failure creating the note, the editor fails to launch, or if there is a problem adding the note to the index.