pub struct TypeDecl {
pub docs: Vec<Spanned<String>>,
pub attrs: Vec<Attribute>,
pub vis: Visibility,
pub name: Spanned<String>,
pub generics: Vec<TypeParam>,
pub def: TypeDef,
}Expand description
A type alias or sum type declaration.
type Color = | Red | Green | Blue
type Alias<T> = Vec<T>Fields§
§docs: Vec<Spanned<String>>The /// lines before it, one entry per line, holding the text after
the /// (spec
docs/superpowers/specs/2026-10-07-phase-3-1-formatter-design.md §4).
attrs: Vec<Attribute>§vis: Visibility§name: Spanned<String>§generics: Vec<TypeParam>§def: TypeDefTrait Implementations§
Auto Trait Implementations§
impl Freeze for TypeDecl
impl RefUnwindSafe for TypeDecl
impl Send for TypeDecl
impl Sync for TypeDecl
impl Unpin for TypeDecl
impl UnsafeUnpin for TypeDecl
impl UnwindSafe for TypeDecl
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