#[non_exhaustive]pub enum BlueprintError {
Show 13 variants
YamlParse {
message: String,
},
InvalidDimension {
value: String,
},
InvalidPercentage {
value: String,
},
InvalidColor {
value: String,
},
CircularInheritance {
chain: Vec<String>,
},
TemplateNotFound {
name: String,
},
InheritanceDepthExceeded {
depth: usize,
max: usize,
},
EmptyStyleMap,
StyleResolution {
style_name: String,
field: String,
},
DuplicateStyleName {
name: String,
},
InvalidMappingReference {
mapping_field: String,
style_name: String,
},
InvalidStyleName {
name: String,
reason: String,
},
Foundation(FoundationError),
}Expand description
The primary error type for the Blueprint crate.
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.
YamlParse
YAML parsing or structure error.
InvalidDimension
Invalid dimension string.
InvalidPercentage
Invalid percentage string.
InvalidColor
Invalid color string.
CircularInheritance
Circular template inheritance detected.
TemplateNotFound
Referenced parent template not found.
InheritanceDepthExceeded
Inheritance chain exceeds depth limit.
EmptyStyleMap
Style map is empty.
StyleResolution
A style could not be fully resolved (missing required fields).
DuplicateStyleName
Duplicate style name.
InvalidMappingReference
Markdown mapping references a non-existent style.
Fields
InvalidStyleName
Invalid style name.
Foundation(FoundationError)
Propagated Foundation error.
Implementations§
Source§impl BlueprintError
impl BlueprintError
Sourcepub fn blueprint_code(&self) -> BlueprintErrorCode
pub fn blueprint_code(&self) -> BlueprintErrorCode
Returns the Blueprint-specific error code.
Trait Implementations§
Source§impl Clone for BlueprintError
impl Clone for BlueprintError
Source§fn clone(&self) -> BlueprintError
fn clone(&self) -> BlueprintError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BlueprintError
impl Debug for BlueprintError
Source§impl Display for BlueprintError
impl Display for BlueprintError
Source§impl Error for BlueprintError
impl Error for BlueprintError
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 ErrorCodeExt for BlueprintError
impl ErrorCodeExt for BlueprintError
Source§impl From<FoundationError> for BlueprintError
impl From<FoundationError> for BlueprintError
Source§fn from(source: FoundationError) -> Self
fn from(source: FoundationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BlueprintError
impl RefUnwindSafe for BlueprintError
impl Send for BlueprintError
impl Sync for BlueprintError
impl Unpin for BlueprintError
impl UnwindSafe for BlueprintError
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