pub struct StructParser { /* private fields */ }Expand description
Parser for Rust structs and enums
Implementations§
Source§impl StructParser
impl StructParser
pub fn new() -> Self
Sourcepub fn should_include_struct(&self, item_struct: &ItemStruct) -> bool
pub fn should_include_struct(&self, item_struct: &ItemStruct) -> bool
Check if a struct should be included in type generation
Sourcepub fn should_include_enum(&self, item_enum: &ItemEnum) -> bool
pub fn should_include_enum(&self, item_enum: &ItemEnum) -> bool
Check if an enum should be included in type generation
Sourcepub fn parse_struct(
&self,
item_struct: &ItemStruct,
file_path: &Path,
type_resolver: &mut TypeResolver,
) -> Option<StructInfo>
pub fn parse_struct( &self, item_struct: &ItemStruct, file_path: &Path, type_resolver: &mut TypeResolver, ) -> Option<StructInfo>
Parse a Rust struct into StructInfo
Sourcepub fn parse_enum(
&self,
item_enum: &ItemEnum,
file_path: &Path,
type_resolver: &mut TypeResolver,
) -> Option<StructInfo>
pub fn parse_enum( &self, item_enum: &ItemEnum, file_path: &Path, type_resolver: &mut TypeResolver, ) -> Option<StructInfo>
Parse a Rust enum into StructInfo
Trait Implementations§
Source§impl Debug for StructParser
impl Debug for StructParser
Auto Trait Implementations§
impl Freeze for StructParser
impl RefUnwindSafe for StructParser
impl Send for StructParser
impl Sync for StructParser
impl Unpin for StructParser
impl UnwindSafe for StructParser
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