enum ContainerType<'a> {
Struct(Vec<NamedStructField<'a>>),
StructNewtype(&'a Ident, Option<KeywordAttribute<from_py_with, LitStrValue<ExprPath>>>),
Tuple(Vec<TupleStructField>),
TupleNewtype(Option<KeywordAttribute<from_py_with, LitStrValue<ExprPath>>>),
}
Expand description
Container Style
Covers Structs, Tuplestructs and corresponding Newtypes.
Variants§
Struct(Vec<NamedStructField<'a>>)
Struct Container, e.g. struct Foo { a: String }
Variant contains the list of field identifiers and the corresponding extraction call.
StructNewtype(&'a Ident, Option<KeywordAttribute<from_py_with, LitStrValue<ExprPath>>>)
Newtype struct container, e.g. #[transparent] struct Foo { a: String }
The field specified by the identifier is extracted directly from the object.
Tuple(Vec<TupleStructField>)
Tuple struct, e.g. struct Foo(String)
.
Variant contains a list of conversion methods for each of the fields that are directly extracted from the tuple.
TupleNewtype(Option<KeywordAttribute<from_py_with, LitStrValue<ExprPath>>>)
Tuple newtype, e.g. #[transparent] struct Foo(String)
The wrapped field is directly extracted from the object.
Auto Trait Implementations§
impl<'a> Freeze for ContainerType<'a>
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§
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