pub enum ItemTypeDecl<'a> {
Resource(ResourceDecl<'a>),
Variant(VariantDecl<'a>),
Record(RecordDecl<'a>),
Flags(FlagsDecl<'a>),
Enum(EnumDecl<'a>),
Alias(TypeAlias<'a>),
}
Expand description
Represents an interface or world type declaration in the AST.
Unlike top-level type declarations, interfaces and worlds can also declare resources.
Variants§
Resource(ResourceDecl<'a>)
The declaration is for a resource.
Variant(VariantDecl<'a>)
The declaration is for a variant.
Record(RecordDecl<'a>)
The declaration is for a record.
Flags(FlagsDecl<'a>)
The declaration is for a flags.
Enum(EnumDecl<'a>)
The declaration is for an enum.
Alias(TypeAlias<'a>)
The declaration is for a type alias.
Implementations§
Trait Implementations§
Source§impl<'a> Clone for ItemTypeDecl<'a>
impl<'a> Clone for ItemTypeDecl<'a>
Source§fn clone(&self) -> ItemTypeDecl<'a>
fn clone(&self) -> ItemTypeDecl<'a>
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<'a> Debug for ItemTypeDecl<'a>
impl<'a> Debug for ItemTypeDecl<'a>
Auto Trait Implementations§
impl<'a> Freeze for ItemTypeDecl<'a>
impl<'a> RefUnwindSafe for ItemTypeDecl<'a>
impl<'a> Send for ItemTypeDecl<'a>
impl<'a> Sync for ItemTypeDecl<'a>
impl<'a> Unpin for ItemTypeDecl<'a>
impl<'a> UnwindSafe for ItemTypeDecl<'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