pub struct VariantModel {
pub name: Ident,
pub code: LitStr,
pub rendering: Rendering,
pub shape: VariantShape,
}Expand description
ONE variant of a leaf error: what it is called, what it is recognised by, and what it says.
Fields§
§name: IdentThe variant’s own name.
code: LitStrIts code = "…" word — mandatory, and validated SCREAMING_SNAKE_CASE.
rendering: RenderingIts error = "…" template, ALREADY REWRITTEN so that every placeholder names a binding this
emission introduces, beside the bindings it has to introduce for them.
shape: VariantShapeHow the variant’s own fields are bound in a pattern.
Trait Implementations§
Source§impl Clone for VariantModel
impl Clone for VariantModel
Auto Trait Implementations§
impl !Send for VariantModel
impl !Sync for VariantModel
impl Freeze for VariantModel
impl RefUnwindSafe for VariantModel
impl Unpin for VariantModel
impl UnsafeUnpin for VariantModel
impl UnwindSafe for VariantModel
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