pub enum Fields {
Tuple(Vec<UnnamedField>),
Struct(Vec<(Ident, UnnamedField)>),
}
Expand description
The different field types an enum variant can have.
Variants§
Tuple(Vec<UnnamedField>)
Tuple-like variant
enum Foo {
Baz(u32)
}
struct Bar(u32);
Struct(Vec<(Ident, UnnamedField)>)
Struct-like variant
enum Foo {
Baz {
baz: u32
}
}
struct Bar {
baz: u32
}
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Fields
impl RefUnwindSafe for Fields
impl !Send for Fields
impl !Sync for Fields
impl Unpin for Fields
impl UnwindSafe for Fields
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