#[non_exhaustive]pub struct PythonAbi {
implementation: PythonImplementation,
kind: PythonAbiKind,
version: PythonVersion,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.implementation: PythonImplementation§kind: PythonAbiKind§version: PythonVersionImplementations§
Source§impl PythonAbi
impl PythonAbi
Sourcepub fn from_stable_abi(
implementation: PythonImplementation,
version: PythonVersion,
stable_abi: Option<(StableAbi, PythonVersion)>,
gil_disabled: bool,
) -> Result<PythonAbi>
pub fn from_stable_abi( implementation: PythonImplementation, version: PythonVersion, stable_abi: Option<(StableAbi, PythonVersion)>, gil_disabled: bool, ) -> Result<PythonAbi>
Constructs the ABI to target for an interpreter of version, given the
stable ABI kind and minimum Python version to target, if any.
Callers decide whether a stable ABI applies to the interpreter; this
does not consult the abi3/abi3t cargo features. The minimum version
must not exceed the interpreter version. Without a stable ABI the
result is version-specific, free-threaded when gil_disabled is set.
Sourcefn from_cargo_features(
implementation: PythonImplementation,
version: PythonVersion,
gil_disabled: bool,
) -> Result<PythonAbi>
fn from_cargo_features( implementation: PythonImplementation, version: PythonVersion, gil_disabled: bool, ) -> Result<PythonAbi>
Constructs the ABI to target for an interpreter of version from the
enabled cargo features.
The stable ABI and its minimum version are selected from the
abi3-py3*/abi3t-py3* cargo features, ignoring them (in favor of a
version-specific build) when the interpreter cannot target the
requested stable ABI. Must be called from a PyO3 crate build script.
pub fn from_build_env( implementation: PythonImplementation, version: PythonVersion, stable_abi_version: Option<PythonVersion>, gil_disabled: bool, ) -> Result<PythonAbi>
use PythonAbi::from_stable_abi and pass the stable ABI to target explicitly; selecting it from the abi3/abi3t cargo features is handled internally by PyO3’s build scripts
Sourcepub fn implementation(&self) -> PythonImplementation
pub fn implementation(&self) -> PythonImplementation
The Python implementation flavor.
Serialized to implementation.
Sourcepub fn kind(&self) -> PythonAbiKind
pub fn kind(&self) -> PythonAbiKind
The ABI flavor
Serialized to kind
Sourcepub fn version(&self) -> PythonVersion
pub fn version(&self) -> PythonVersion
Python X.Y version. e.g. 3.9.
Serialized to version.
Trait Implementations§
impl Copy for PythonAbi
Source§impl Eq for PythonAbi
impl Eq for PythonAbi
Source§#[doc(hidden)]fn assert_fields_are_eq(&self)
#[doc(hidden)]fn assert_fields_are_eq(&self)
derive_eq_internals)1.0.0 (const: unstable) · Source§#[doc(hidden)]fn assert_receiver_is_total_eq(&self)
#[doc(hidden)]fn assert_receiver_is_total_eq(&self)
implementation detail of #[derive(Eq)]
impl StructuralPartialEq for PythonAbi
impl TrivialClone for PythonAbi
Auto Trait Implementations§
impl Freeze for PythonAbi
impl RefUnwindSafe for PythonAbi
impl Send for PythonAbi
impl Sync for PythonAbi
impl Unpin for PythonAbi
impl UnsafeUnpin for PythonAbi
impl UnwindSafe for PythonAbi
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> SizeHint for Twhere
T: ?Sized,
impl<T> SizeHint for Twhere
T: ?Sized,
Source§default fn lower_bound(&self) -> usize
default fn lower_bound(&self) -> usize
core_io_internals)[u8; 12] could return any value between 0 and
12 inclusively as a correct implementation. Read moreSource§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)]const SIZE: usize = _
#[doc(hidden)]const SIZE: usize = _
sized_type_properties)Source§#[doc(hidden)]const ALIGN: usize = _
#[doc(hidden)]const ALIGN: usize = _
sized_type_properties)Source§#[doc(hidden)]const ALIGNMENT: Alignment = _
#[doc(hidden)]const ALIGNMENT: Alignment = _
ptr_alignment_type)Source§#[doc(hidden)]const IS_ZST: bool = _
#[doc(hidden)]const IS_ZST: bool = _
sized_type_properties)Source§#[doc(hidden)]const LAYOUT: Layout = _
#[doc(hidden)]const LAYOUT: Layout = _
sized_type_properties)Source§#[doc(hidden)]const MAX_SLICE_LEN: usize = _
#[doc(hidden)]const MAX_SLICE_LEN: usize = _
sized_type_properties)[Self]. Read more