pub struct EnumShape { /* private fields */ }Expand description
An enum declaration: its name and its constructors in declaration order.
Implementations§
Source§impl EnumShape
impl EnumShape
Sourcepub fn new(
name: &str,
constructors: impl IntoIterator<Item = Constructor>,
) -> Arc<Self> ⓘ
pub fn new( name: &str, constructors: impl IntoIterator<Item = Constructor>, ) -> Arc<Self> ⓘ
Returns the shape of the enum name declaring constructors, in
order.
Sourcepub fn constructor(&self, index: usize) -> Option<&Constructor>
pub fn constructor(&self, index: usize) -> Option<&Constructor>
Returns the constructor at a declaration index.
Trait Implementations§
impl Eq for EnumShape
impl StructuralPartialEq for EnumShape
Auto Trait Implementations§
impl Freeze for EnumShape
impl RefUnwindSafe for EnumShape
impl Send for EnumShape
impl Sync for EnumShape
impl Unpin for EnumShape
impl UnsafeUnpin for EnumShape
impl UnwindSafe for EnumShape
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