pub enum TypeDef {
Struct(StructDef),
Enum(EnumDef),
}Expand description
Top-level item — either a struct or an enum.
Variants§
Implementations§
Source§impl TypeDef
impl TypeDef
Sourcepub fn generics(&self) -> &[String]
pub fn generics(&self) -> &[String]
Get the generic type parameter names (empty for enums and non-generic structs).
Sourcepub fn collect_referenced_types(&self) -> BTreeSet<String>
pub fn collect_referenced_types(&self) -> BTreeSet<String>
Collect all externally-referenced type names used in fields.
Returns type names that appear as Named("X") or Generic("X", ...),
excluding the struct’s own generic parameters (like T, U).
These are the types that need cross-file imports.
Trait Implementations§
impl StructuralPartialEq for TypeDef
Auto Trait Implementations§
impl Freeze for TypeDef
impl RefUnwindSafe for TypeDef
impl Send for TypeDef
impl Sync for TypeDef
impl Unpin for TypeDef
impl UnsafeUnpin for TypeDef
impl UnwindSafe for TypeDef
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