pub struct EnumShape {
pub name: &'static str,
pub doc: &'static str,
pub tag: Option<&'static str>,
pub variants: Vec<Variant>,
}Expand description
An enum’s shape: its variants, and the key naming one if it’s tagged.
Fields§
§name: &'static strIts name in the docs.
doc: &'static strIts docs.
tag: Option<&'static str>The key naming the variant ("type"), None for an enum of names.
variants: Vec<Variant>Its variants, in order.
Trait Implementations§
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