⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here
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

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.