#[non_exhaustive]pub enum Error {
Show 27 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),
IncludeIndentTooLarge(Box<SourceLocation>, usize, usize),
InvalidLevelOffset(Box<SourceLocation>, String),
InvalidDocumentAttribute {
name: String,
value: String,
expected: &'static str,
location: Option<Box<SourceLocation>>,
},
Io(Error),
IncludeSource(IncludeSourceError),
IncludeSourceTooLarge(String),
IncludeExpansionTooLarge(Box<SourceLocation>, usize),
IncludeSelectionTooComplex(String),
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)
IncludeIndentTooLarge(Box<SourceLocation>, usize, usize)
InvalidLevelOffset(Box<SourceLocation>, String)
InvalidDocumentAttribute
A document attribute value did not match its documented domain.
Fields
§
location: Option<Box<SourceLocation>>Source location for a document entry, when available.
Io(Error)
IncludeSource(IncludeSourceError)
IncludeSourceTooLarge(String)
IncludeExpansionTooLarge(Box<SourceLocation>, usize)
Selected text from repeated or nested includes exceeded the per-parse budget. Carries the directive’s location and the configured limit in bytes.
IncludeSelectionTooComplex(String)
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 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<IncludeSourceError> for Error
impl From<IncludeSourceError> for Error
Source§fn from(source: IncludeSourceError) -> Self
fn from(source: IncludeSourceError) -> Self
Converts to this type from the input type.
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 !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin 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