pub enum BrickError {
AssertionFailed {
assertion: BrickAssertion,
reason: String,
},
BudgetExceeded(BudgetViolation),
InvalidTransition {
from: String,
to: String,
reason: String,
},
MissingChild {
expected: String,
},
HtmlGenerationFailed {
reason: String,
},
}Expand description
Yuan Gate: Zero-swallow error handling for bricks
Named after the Yuan dynasty’s strict quality standards. Every error must be explicitly handled - no silent drops.
Variants§
AssertionFailed
Assertion failed during verification
BudgetExceeded(BudgetViolation)
Budget exceeded during rendering
InvalidTransition
Invalid state transition
Fields
MissingChild
Missing required child brick
HtmlGenerationFailed
HTML generation failed
Trait Implementations§
Source§impl Clone for BrickError
impl Clone for BrickError
Source§fn clone(&self) -> BrickError
fn clone(&self) -> BrickError
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 BrickError
impl Debug for BrickError
Source§impl Display for BrickError
impl Display for BrickError
Source§impl Error for BrickError
impl Error for BrickError
1.30.0 · 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 BrickError
impl RefUnwindSafe for BrickError
impl Send for BrickError
impl Sync for BrickError
impl Unpin for BrickError
impl UnwindSafe for BrickError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more