enum ContainerType<'a> {
    Struct(Vec<NamedStructField<'a>>),
    StructNewtype(&'a Ident, Option<KeywordAttribute<from_py_with, ExprPathWrap>>),
    Tuple(Vec<TupleStructField>),
    TupleNewtype(Option<KeywordAttribute<from_py_with, ExprPathWrap>>),
}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, ExprPathWrap>>)
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, ExprPathWrap>>)
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
Source§impl<T> SizedTypeProperties for T
 
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)] const IS_ZST: bool = _
 
#[doc(hidden)] const IS_ZST: bool = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)] const LAYOUT: Layout = _
 
#[doc(hidden)] const LAYOUT: Layout = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)] const MAX_SLICE_LEN: usize = _
 
#[doc(hidden)] const MAX_SLICE_LEN: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties)The largest safe length for a 
[Self]. Read more