Struct TypeDef
pub struct TypeDef<'a> {
doc: Option<&'a Doc>,
kind: TypeDefKind<'a>,
name: &'a Name,
}Expand description
A type declaration.
Fields§
§doc: Option<&'a Doc>§kind: TypeDefKind<'a>§name: &'a NameImplementations§
§impl<'a> TypeDef<'a>
impl<'a> TypeDef<'a>
pub const fn enumeration(name: &'a Name, variants: &'a [Variant<'a>]) -> Self
pub const fn enumeration(name: &'a Name, variants: &'a [Variant<'a>]) -> Self
Creates the declaration of an enum type without a doc comment.
pub const fn kind(self) -> TypeDefKind<'a>
pub const fn kind(self) -> TypeDefKind<'a>
Returns whether the type is a struct or an enum, with its fields or variants.
Trait Implementations§
impl<'a> Copy for TypeDef<'a>
impl<'a> Eq for TypeDef<'a>
impl<'a> StructuralPartialEq for TypeDef<'a>
Auto Trait Implementations§
impl<'a> Freeze for TypeDef<'a>
impl<'a> RefUnwindSafe for TypeDef<'a>
impl<'a> Send for TypeDef<'a>
impl<'a> Sync for TypeDef<'a>
impl<'a> Unpin for TypeDef<'a>
impl<'a> UnsafeUnpin for TypeDef<'a>
impl<'a> UnwindSafe for TypeDef<'a>
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