pub enum PureFields {
Named(Vec<PureField>),
Tuple(Vec<PureTupleField>),
Unit,
}Expand description
Struct fields.
Variants§
Named(Vec<PureField>)
Named fields: { x: i32, y: i32 }
Tuple(Vec<PureTupleField>)
Tuple fields: (i32, i32) — carried as PureTupleField so per-field
attrs (e.g. #[from]) and vis survive AST round-trip.
Pre-fix this variant carried Vec<PureType>, which silently dropped
every #[derive(thiserror::Error)] enum E { Foo(#[from] InnerErr) }-
style attribute and broke ? operator conversions in regenerated
files (see test_roundtrip_tuple_variant_from_attribute).
Unit
Unit struct: no fields.
Trait Implementations§
Source§impl Clone for PureFields
impl Clone for PureFields
Source§fn clone(&self) -> PureFields
fn clone(&self) -> PureFields
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PureFields
impl Debug for PureFields
impl Eq for PureFields
Source§impl PartialEq for PureFields
impl PartialEq for PureFields
impl StructuralPartialEq for PureFields
Auto Trait Implementations§
impl Freeze for PureFields
impl RefUnwindSafe for PureFields
impl Send for PureFields
impl Sync for PureFields
impl Unpin for PureFields
impl UnsafeUnpin for PureFields
impl UnwindSafe for PureFields
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