#[non_exhaustive]pub enum Error {
Show 21 variants
InvalidIncludePath(Box<SourceLocation>, PathBuf),
InvalidLineRange(Box<SourceLocation>, String),
Parse(Box<SourceLocation>, String),
PegParse(Box<SourceLocation>, String),
ParseGrammar(ParseError<LineCol>),
NestedSectionLevelMismatch(Box<SourceLocation>, u8, u8),
MismatchedDelimiters(Box<SourceLocation>, String),
InvalidAdmonitionVariant(Box<SourceLocation>, String),
InvalidConditionalDirective(Box<SourceLocation>),
InvalidIncludeDirective(Box<SourceLocation>, String),
InvalidIndent(Box<SourceLocation>, String),
InvalidLevelOffset(Box<SourceLocation>, String),
Io(Error),
Url(ParseError),
ParseInt(ParseIntError),
InvalidIfEvalDirectiveMismatchedTypes(Box<SourceLocation>),
UnknownEncoding(String),
UnrecognizedEncodingInFile(String),
NetworkDisabled,
TryFromIntError(TryFromIntError),
NonConformingManpageTitle(Box<SourceLocation>, String),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidIncludePath(Box<SourceLocation>, PathBuf)
InvalidLineRange(Box<SourceLocation>, String)
Parse(Box<SourceLocation>, String)
PegParse(Box<SourceLocation>, String)
ParseGrammar(ParseError<LineCol>)
NestedSectionLevelMismatch(Box<SourceLocation>, u8, u8)
MismatchedDelimiters(Box<SourceLocation>, String)
InvalidAdmonitionVariant(Box<SourceLocation>, String)
InvalidConditionalDirective(Box<SourceLocation>)
InvalidIncludeDirective(Box<SourceLocation>, String)
InvalidIndent(Box<SourceLocation>, String)
InvalidLevelOffset(Box<SourceLocation>, String)
Io(Error)
Url(ParseError)
ParseInt(ParseIntError)
InvalidIfEvalDirectiveMismatchedTypes(Box<SourceLocation>)
UnknownEncoding(String)
UnrecognizedEncodingInFile(String)
NetworkDisabled
TryFromIntError(TryFromIntError)
NonConformingManpageTitle(Box<SourceLocation>, String)
Implementations§
Source§impl Error
impl Error
Sourcepub fn source_location(&self) -> Option<&SourceLocation>
pub fn source_location(&self) -> Option<&SourceLocation>
Extract source location information from this error if available.
Returns the SourceLocation (either Location or Position) for errors that have positional information.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Error
impl<'de> Deserialize<'de> for Error
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ParseError<LineCol>> for Error
impl From<ParseError<LineCol>> for Error
Source§fn from(source: ParseError<LineCol>) -> Self
fn from(source: ParseError<LineCol>) -> Self
Converts to this type from the input type.
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Source§impl From<ParseIntError> for Error
impl From<ParseIntError> for Error
Source§fn from(source: ParseIntError) -> Self
fn from(source: ParseIntError) -> Self
Converts to this type from the input type.
Source§impl From<TryFromIntError> for Error
impl From<TryFromIntError> for Error
Source§fn from(source: TryFromIntError) -> Self
fn from(source: TryFromIntError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more