struct CrossCompileEnvVars {
pyo3_cross: Option<OsString>,
pyo3_cross_lib_dir: Option<OsString>,
pyo3_cross_python_version: Option<OsString>,
pyo3_cross_python_implementation: Option<OsString>,
}
Expand description
PyO3-specific cross compile environment variable values
Fields§
§pyo3_cross: Option<OsString>
PYO3_CROSS
pyo3_cross_lib_dir: Option<OsString>
PYO3_CROSS_LIB_DIR
pyo3_cross_python_version: Option<OsString>
PYO3_CROSS_PYTHON_VERSION
pyo3_cross_python_implementation: Option<OsString>
PYO3_CROSS_PYTHON_IMPLEMENTATION
Implementations§
Source§impl CrossCompileEnvVars
impl CrossCompileEnvVars
Sourcefn from_env() -> Self
fn from_env() -> Self
Grabs the PyO3 cross-compile variables from the environment.
Registers the build script to rerun if any of the variables changes.
Sourcefn parse_version(&self) -> Result<(Option<PythonVersion>, Option<String>)>
fn parse_version(&self) -> Result<(Option<PythonVersion>, Option<String>)>
Parses PYO3_CROSS_PYTHON_VERSION
environment variable value
into PythonVersion
and ABI flags.
Sourcefn parse_implementation(&self) -> Result<Option<PythonImplementation>>
fn parse_implementation(&self) -> Result<Option<PythonImplementation>>
Parses PYO3_CROSS_PYTHON_IMPLEMENTATION
environment variable value
into PythonImplementation
.
Sourcefn lib_dir_path(&self) -> Result<Option<PathBuf>>
fn lib_dir_path(&self) -> Result<Option<PathBuf>>
Converts the stored PYO3_CROSS_LIB_DIR
variable value (if any)
into a PathBuf
instance.
Ensures that the path is a valid UTF-8 string.
Auto Trait Implementations§
impl Freeze for CrossCompileEnvVars
impl RefUnwindSafe for CrossCompileEnvVars
impl Send for CrossCompileEnvVars
impl Sync for CrossCompileEnvVars
impl Unpin for CrossCompileEnvVars
impl UnwindSafe for CrossCompileEnvVars
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