pub struct ErrorModel {
pub name: Ident,
pub road: ErrorRoad,
pub variants: Vec<VariantModel>,
}Expand description
A validated leaf-error declaration, ready to emit.
PLAIN, for the reason every model in this crate has plain fields: the derive today and a manifest front end later reach the same emitter.
Fields§
§name: IdentThe declared type — the enum both impls are emitted for.
road: ErrorRoadWhich macro minted it.
variants: Vec<VariantModel>Every variant, in declaration order.
Implementations§
Source§impl ErrorModel
impl ErrorModel
Sourcepub fn emit(&self) -> TokenStream
pub fn emit(&self) -> TokenStream
The whole expansion: what it prints, that it IS an error, and the word it is recognised by.
Trait Implementations§
Source§impl Clone for ErrorModel
impl Clone for ErrorModel
Auto Trait Implementations§
impl !Send for ErrorModel
impl !Sync for ErrorModel
impl Freeze for ErrorModel
impl RefUnwindSafe for ErrorModel
impl Unpin for ErrorModel
impl UnsafeUnpin for ErrorModel
impl UnwindSafe for ErrorModel
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