enum ContainerType<'a> {
Struct(Vec<(&'a Ident, FieldPyO3Attributes)>),
StructNewtype(&'a Ident),
Tuple(usize),
TupleNewtype,
}
Expand description
Container Style
Covers Structs, Tuplestructs and corresponding Newtypes.
Variants
Struct(Vec<(&'a Ident, FieldPyO3Attributes)>)
Struct Container, e.g. struct Foo { a: String }
Variant contains the list of field identifiers and the corresponding extraction call.
StructNewtype(&'a Ident)
Newtype struct container, e.g. #[transparent] struct Foo { a: String }
The field specified by the identifier is extracted directly from the object.
Tuple(usize)
Tuple struct, e.g. struct Foo(String)
.
Fields are extracted from a tuple.
TupleNewtype
Tuple newtype, e.g. #[transparent] struct Foo(String)
The wrapped field is directly extracted from the object.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for ContainerType<'a>
impl<'a> !Send for ContainerType<'a>
impl<'a> !Sync for ContainerType<'a>
impl<'a> Unpin for ContainerType<'a>
impl<'a> UnwindSafe for ContainerType<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more