Struct maturin::PyProjectToml
source · [−]pub struct PyProjectToml {
pub tool: Option<Tool>,
/* private fields */
}
Expand description
A pyproject.toml as specified in PEP 517
Fields
tool: Option<Tool>
PEP 518: The [tool]
table is where any tool related to your Python project, not just build
tools, can have users specify configuration data as long as they use a sub-table within
[tool]
, e.g. the flit tool would store its configuration in [tool.flit]
.
We use it for [tool.maturin]
Implementations
sourceimpl PyProjectToml
impl PyProjectToml
sourcepub fn new(project_root: impl AsRef<Path>) -> Result<PyProjectToml>
pub fn new(project_root: impl AsRef<Path>) -> Result<PyProjectToml>
Returns the contents of a pyproject.toml with a [build-system]
entry or an error
Does no specific error handling because it’s only used to check whether or not to build source distributions
sourcepub fn sdist_include(&self) -> Option<&Vec<String>>
pub fn sdist_include(&self) -> Option<&Vec<String>>
Returns the value of [tool.maturin.sdist-include]
in pyproject.toml
sourcepub fn bindings(&self) -> Option<&str>
pub fn bindings(&self) -> Option<&str>
Returns the value of [tool.maturin.bindings]
in pyproject.toml
sourcepub fn cargo_extra_args(&self) -> Option<&str>
pub fn cargo_extra_args(&self) -> Option<&str>
Returns the value of [tool.maturin.cargo-extra-args]
in pyproject.toml
sourcepub fn compatibility(&self) -> Option<PlatformTag>
pub fn compatibility(&self) -> Option<PlatformTag>
Returns the value of [tool.maturin.compatibility]
in pyproject.toml
sourcepub fn rustc_extra_args(&self) -> Option<&str>
pub fn rustc_extra_args(&self) -> Option<&str>
Returns the value of [tool.maturin.rustc-extra-args]
in pyproject.toml
sourcepub fn skip_auditwheel(&self) -> bool
pub fn skip_auditwheel(&self) -> bool
Returns the value of [tool.maturin.skip-auditwheel]
in pyproject.toml
sourcepub fn manifest_path(&self) -> Option<&Path>
pub fn manifest_path(&self) -> Option<&Path>
Returns the value of [tool.maturin.manifest-path]
in pyproject.toml
sourcepub fn warn_missing_maturin_version(&self) -> bool
pub fn warn_missing_maturin_version(&self) -> bool
Having a pyproject.toml without a version constraint is a bad idea because at some point we’ll have to do breaking changes and then source distributions would break
Returns true if the pyproject.toml has the constraint
sourcepub fn warn_missing_build_backend(&self) -> bool
pub fn warn_missing_build_backend(&self) -> bool
Having a pyproject.toml without build-backend
set to maturin
may result in build errors when build from source distribution
Returns true if the pyproject.toml has build-backend
set to maturin
Trait Implementations
sourceimpl Clone for PyProjectToml
impl Clone for PyProjectToml
sourcefn clone(&self) -> PyProjectToml
fn clone(&self) -> PyProjectToml
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PyProjectToml
impl Debug for PyProjectToml
sourceimpl Deref for PyProjectToml
impl Deref for PyProjectToml
type Target = ProjectToml
type Target = ProjectToml
The resulting type after dereferencing.
sourceimpl<'de> Deserialize<'de> for PyProjectToml
impl<'de> Deserialize<'de> for PyProjectToml
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for PyProjectToml
impl Serialize for PyProjectToml
Auto Trait Implementations
impl RefUnwindSafe for PyProjectToml
impl Send for PyProjectToml
impl Sync for PyProjectToml
impl Unpin for PyProjectToml
impl UnwindSafe for PyProjectToml
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more