pub enum NoteError {
Show 16 variants Read { path: PathBuf, source: Error, }, CannotPrependHeader { existing_header: String, }, TeraTemplate { source_str: String, template_str: String, }, Tera { source: Error, }, MissingFrontMatterField { field_name: String, }, CompulsoryFrontMatterFieldIsEmpty { field_name: String, }, InvalidFrontMatterYaml { front_matter: String, source_error: Error, }, InvalidInputYaml { tmpl_var: String, source_str: String, }, MissingFrontMatter { compulsory_field: String, }, SortTagVarInvalidChar { sort_tag: String, sort_tag_chars: String, }, FileExtNotRegistered { extension: Box<String>, md_ext: Box<Vec<String>>, rst_ext: Box<Vec<String>>, html_ext: Box<Vec<String>>, txt_ext: Box<Vec<String>>, no_viewer_ext: Box<Vec<String>>, }, RstParse { msg: String, }, Utf8Conversion { source: Utf8Error, }, File(FileError), Io(Error), ParseLanguageCode(LibCfgError),
}
Expand description

Error type returned form methods in or related to the note module.

Variants§

§

Read

Fields

§path: PathBuf
§source: Error

Remedy: check the file permission of the note file.

§

CannotPrependHeader

Fields

§existing_header: String

Remedy: report this error. It should not happen.

§

TeraTemplate

Fields

§source_str: String
§template_str: String

Remedy: check the syntax of the Tera template in the configuration file.

§

Tera

Fields

§source: Error

Remedy: restart with --debug trace.

§

MissingFrontMatterField

Fields

§field_name: String

Remedy: add the missing field in the note’s front matter.

§

CompulsoryFrontMatterFieldIsEmpty

Fields

§field_name: String

Remedy: enter a string.

§

InvalidFrontMatterYaml

Fields

§front_matter: String
§source_error: Error

Remedy: check YAML syntax in the note’s front matter.

§

InvalidInputYaml

Fields

§tmpl_var: String
§source_str: String

Remedy: check YAML syntax in the input stream’s front matter.

§

MissingFrontMatter

Fields

§compulsory_field: String

Remedy: check front matter delimiters ----.

§

SortTagVarInvalidChar

Fields

§sort_tag: String
§sort_tag_chars: String

Remedy: remove invalid characters.

§

FileExtNotRegistered

Fields

§extension: Box<String>
§md_ext: Box<Vec<String>>
§rst_ext: Box<Vec<String>>
§html_ext: Box<Vec<String>>
§txt_ext: Box<Vec<String>>
§no_viewer_ext: Box<Vec<String>>

Remedy: correct the front matter variable file_ext.

§

RstParse

Fields

Remedy: check reStructuredText syntax.

§

Utf8Conversion

Fields

§source: Utf8Error
§

File(FileError)

§

Io(Error)

§

ParseLanguageCode(LibCfgError)

Trait Implementations§

source§

impl Debug for NoteError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for NoteError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for NoteError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<Error> for NoteError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for NoteError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<FileError> for NoteError

source§

fn from(source: FileError) -> Self

Converts to this type from the input type.
source§

impl From<LibCfgError> for NoteError

source§

fn from(source: LibCfgError) -> Self

Converts to this type from the input type.
source§

impl From<Utf8Error> for NoteError

source§

fn from(source: Utf8Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AsFail for Twhere T: Fail,

§

fn as_fail(&self) -> &(dyn Fail + 'static)

Converts a reference to Self into a dynamic trait object of Fail.
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<E> Fail for Ewhere E: Error + Send + Sync + 'static,

§

fn name(&self) -> Option<&str>

Returns the “name” of the error. Read more
§

fn cause(&self) -> Option<&(dyn Fail + 'static)>

Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more
§

fn backtrace(&self) -> Option<&Backtrace>

Returns a reference to the Backtrace carried by this failure, if it carries one. Read more
§

fn context<D>(self, context: D) -> Context<D>where D: Display + Send + Sync + 'static, Self: Sized,

Provides context for this failure. Read more
§

fn compat(self) -> Compat<Self>where Self: Sized,

Wraps this failure in a compatibility wrapper that implements std::error::Error. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> ToCompactString for Twhere T: Display,

§

fn to_compact_string(&self) -> CompactString

Converts the given value to a [CompactString]. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V