pub struct EnumDef {
pub name: String,
pub generics: Vec<String>,
pub variants: Vec<EnumVariant>,
pub source_file: PathBuf,
pub docs: Option<String>,
pub rename_all: Option<RenameRule>,
pub tagging: EnumTagging,
}Expand description
All user-defined enum types found in the scanned source files. Needed for generating corresponding TypeScript union types.
Fields§
§name: StringEnum name
generics: Vec<String>Generic type parameter names (e.g. ["T"], ["A", "B"])
variants: Vec<EnumVariant>Variants of the enum
source_file: PathBufSource file this enum was defined in
docs: Option<String>Doc comment extracted from /// lines
rename_all: Option<RenameRule>Container-level #[serde(rename_all = "...")]
tagging: EnumTaggingSerde enum tagging strategy
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EnumDef
impl<'de> Deserialize<'de> for EnumDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EnumDef
impl RefUnwindSafe for EnumDef
impl Send for EnumDef
impl Sync for EnumDef
impl Unpin for EnumDef
impl UnsafeUnpin for EnumDef
impl UnwindSafe for EnumDef
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