pub enum PStructKind {
Struct {
fields: Vec<PStructField>,
},
TupleStruct {
fields: Vec<PStructField>,
},
UnitStruct,
}Expand description
Parsed struct kind, modeled after StructKind.
Variants§
Struct
A regular struct with named fields.
Fields
§
fields: Vec<PStructField>The struct fields
TupleStruct
A tuple struct.
Fields
§
fields: Vec<PStructField>The tuple fields
UnitStruct
A unit struct.
Implementations§
Source§impl PStructKind
impl PStructKind
Sourcepub fn parse(kind: &StructKind, rename_all_rule: Option<RenameRule>) -> Self
pub fn parse(kind: &StructKind, rename_all_rule: Option<RenameRule>) -> Self
Parse a crate::StructKind into a PStructKind.
Passes rename_all_rule through to all PStructField parsing.
Auto Trait Implementations§
impl Freeze for PStructKind
impl RefUnwindSafe for PStructKind
impl !Send for PStructKind
impl !Sync for PStructKind
impl Unpin for PStructKind
impl UnwindSafe for PStructKind
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