Struct PyProjectProjectMetadata
pub struct PyProjectProjectMetadata { /* private fields */ }Expand description
Partial [project] metadata.
Implementations§
§impl PyProjectProjectMetadata
impl PyProjectProjectMetadata
pub const fn new() -> PyProjectProjectMetadata
pub const fn new() -> PyProjectProjectMetadata
Creates empty project metadata.
pub fn with_name(
self,
name: &str,
) -> Result<PyProjectProjectMetadata, PyProjectTextError>
pub fn with_name( self, name: &str, ) -> Result<PyProjectProjectMetadata, PyProjectTextError>
pub fn with_version(
self,
version: &str,
) -> Result<PyProjectProjectMetadata, PyProjectTextError>
pub fn with_version( self, version: &str, ) -> Result<PyProjectProjectMetadata, PyProjectTextError>
Sets the project version.
§Errors
Returns PyProjectTextError::Empty when version is empty after trimming.
pub fn with_dependency(
self,
dependency: PyProjectDependency,
) -> PyProjectProjectMetadata
pub fn with_dependency( self, dependency: PyProjectDependency, ) -> PyProjectProjectMetadata
Adds a dependency.
pub fn with_optional_dependency_group(
self,
group: PyProjectOptionalDependencyGroup,
) -> PyProjectProjectMetadata
pub fn with_optional_dependency_group( self, group: PyProjectOptionalDependencyGroup, ) -> PyProjectProjectMetadata
Adds an optional dependency group label.
pub fn with_script(self, script: PyProjectScript) -> PyProjectProjectMetadata
pub fn with_script(self, script: PyProjectScript) -> PyProjectProjectMetadata
Adds a script label.
pub fn with_entry_point(
self,
entry_point: PyProjectEntryPoint,
) -> PyProjectProjectMetadata
pub fn with_entry_point( self, entry_point: PyProjectEntryPoint, ) -> PyProjectProjectMetadata
Adds an entry point label.
pub fn dependencies(&self) -> &[PyProjectDependency]
pub fn dependencies(&self) -> &[PyProjectDependency]
Returns dependencies.
pub fn optional_dependency_groups(&self) -> &[PyProjectOptionalDependencyGroup]
pub fn optional_dependency_groups(&self) -> &[PyProjectOptionalDependencyGroup]
Returns optional dependency group labels.
pub fn scripts(&self) -> &[PyProjectScript]
pub fn scripts(&self) -> &[PyProjectScript]
Returns script labels.
pub fn entry_points(&self) -> &[PyProjectEntryPoint]
pub fn entry_points(&self) -> &[PyProjectEntryPoint]
Returns entry point labels.
Trait Implementations§
§impl Clone for PyProjectProjectMetadata
impl Clone for PyProjectProjectMetadata
§fn clone(&self) -> PyProjectProjectMetadata
fn clone(&self) -> PyProjectProjectMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for PyProjectProjectMetadata
impl Debug for PyProjectProjectMetadata
§impl Default for PyProjectProjectMetadata
impl Default for PyProjectProjectMetadata
§fn default() -> PyProjectProjectMetadata
fn default() -> PyProjectProjectMetadata
Returns the “default value” for a type. Read more
§impl PartialEq for PyProjectProjectMetadata
impl PartialEq for PyProjectProjectMetadata
impl Eq for PyProjectProjectMetadata
impl StructuralPartialEq for PyProjectProjectMetadata
Auto Trait Implementations§
impl Freeze for PyProjectProjectMetadata
impl RefUnwindSafe for PyProjectProjectMetadata
impl Send for PyProjectProjectMetadata
impl Sync for PyProjectProjectMetadata
impl Unpin for PyProjectProjectMetadata
impl UnsafeUnpin for PyProjectProjectMetadata
impl UnwindSafe for PyProjectProjectMetadata
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