pub enum MarkdownConfigError {
ParseError {
message: String,
},
YamlError {
message: String,
},
ValidationError {
message: String,
},
LoadError {
path: PathBuf,
message: String,
},
RegistrationError {
message: String,
},
WatchError {
message: String,
},
MissingField {
field: String,
},
InvalidFieldValue {
field: String,
message: String,
},
IoError(Error),
}Expand description
Errors that can occur during markdown configuration parsing and validation
Variants§
ParseError
Failed to parse markdown content
YamlError
Invalid YAML frontmatter
ValidationError
Schema validation failed
LoadError
Failed to load configuration file
RegistrationError
Registration failed
WatchError
File watch error
MissingField
Missing required field
InvalidFieldValue
Invalid field value
IoError(Error)
IO error
Implementations§
Source§impl MarkdownConfigError
impl MarkdownConfigError
Sourcepub fn parse_error(message: impl Into<String>) -> Self
pub fn parse_error(message: impl Into<String>) -> Self
Create a parse error with context
Sourcepub fn yaml_error(message: impl Into<String>) -> Self
pub fn yaml_error(message: impl Into<String>) -> Self
Create a YAML error with context
Sourcepub fn validation_error(message: impl Into<String>) -> Self
pub fn validation_error(message: impl Into<String>) -> Self
Create a validation error with context
Sourcepub fn load_error(path: impl Into<PathBuf>, message: impl Into<String>) -> Self
pub fn load_error(path: impl Into<PathBuf>, message: impl Into<String>) -> Self
Create a load error with path and message
Sourcepub fn registration_error(message: impl Into<String>) -> Self
pub fn registration_error(message: impl Into<String>) -> Self
Create a registration error
Sourcepub fn missing_field(field: impl Into<String>) -> Self
pub fn missing_field(field: impl Into<String>) -> Self
Create a missing field error
Sourcepub fn invalid_field_value(
field: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn invalid_field_value( field: impl Into<String>, message: impl Into<String>, ) -> Self
Create an invalid field value error
Sourcepub fn watch_error(message: impl Into<String>) -> Self
pub fn watch_error(message: impl Into<String>) -> Self
Create a watch error
Trait Implementations§
Source§impl Debug for MarkdownConfigError
impl Debug for MarkdownConfigError
Source§impl Display for MarkdownConfigError
impl Display for MarkdownConfigError
Source§impl Error for MarkdownConfigError
impl Error for MarkdownConfigError
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()
Auto Trait Implementations§
impl Freeze for MarkdownConfigError
impl !RefUnwindSafe for MarkdownConfigError
impl Send for MarkdownConfigError
impl Sync for MarkdownConfigError
impl Unpin for MarkdownConfigError
impl !UnwindSafe for MarkdownConfigError
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