pub enum ContainerAttribute {
Transparent(transparent),
ItemAll(from_item_all),
ErrorAnnotation(LitStr),
Crate(KeywordAttribute<Crate, LitStrValue<Path>>),
RenameAll(KeywordAttribute<rename_all, RenamingRuleLitStr>),
}Expand description
Attributes for deriving FromPyObject/IntoPyObject scoped on containers.
Variants§
Transparent(transparent)
Treat the Container as a Wrapper, operate directly on its field
ItemAll(from_item_all)
Force every field to be extracted from item of source Python object.
ErrorAnnotation(LitStr)
Change the name of an enum variant in the generated error message.
Crate(KeywordAttribute<Crate, LitStrValue<Path>>)
Change the path for the pyo3 crate
RenameAll(KeywordAttribute<rename_all, RenamingRuleLitStr>)
Converts the field idents according to the RenamingRule before extraction
Trait Implementations§
Source§impl Parse for ContainerAttribute
impl Parse for ContainerAttribute
fn parse(input: ParseStream<'_>) -> Result<Self>
Auto Trait Implementations§
impl Freeze for ContainerAttribute
impl RefUnwindSafe for ContainerAttribute
impl !Send for ContainerAttribute
impl !Sync for ContainerAttribute
impl Unpin for ContainerAttribute
impl UnsafeUnpin for ContainerAttribute
impl UnwindSafe for ContainerAttribute
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 SIZE: usize = _
#[doc(hidden)]const SIZE: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const ALIGN: usize = _
#[doc(hidden)]const ALIGN: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const ALIGNMENT: Alignment = _
#[doc(hidden)]const ALIGNMENT: Alignment = _
🔬This is a nightly-only experimental API. (
ptr_alignment_type)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