pub struct PyProjectProjectMetadata { /* private fields */ }Expand description
Partial [project] metadata.
Implementations§
Source§impl PyProjectProjectMetadata
impl PyProjectProjectMetadata
Sourcepub fn with_name(self, name: &str) -> Result<Self, PyProjectTextError>
pub fn with_name(self, name: &str) -> Result<Self, PyProjectTextError>
Sourcepub fn with_version(self, version: &str) -> Result<Self, PyProjectTextError>
pub fn with_version(self, version: &str) -> Result<Self, PyProjectTextError>
Sets the project version.
§Errors
Returns PyProjectTextError::Empty when version is empty after trimming.
Sourcepub fn with_dependency(self, dependency: PyProjectDependency) -> Self
pub fn with_dependency(self, dependency: PyProjectDependency) -> Self
Adds a dependency.
Sourcepub fn with_optional_dependency_group(
self,
group: PyProjectOptionalDependencyGroup,
) -> Self
pub fn with_optional_dependency_group( self, group: PyProjectOptionalDependencyGroup, ) -> Self
Adds an optional dependency group label.
Sourcepub fn with_script(self, script: PyProjectScript) -> Self
pub fn with_script(self, script: PyProjectScript) -> Self
Adds a script label.
Sourcepub fn with_entry_point(self, entry_point: PyProjectEntryPoint) -> Self
pub fn with_entry_point(self, entry_point: PyProjectEntryPoint) -> Self
Adds an entry point label.
Sourcepub fn dependencies(&self) -> &[PyProjectDependency]
pub fn dependencies(&self) -> &[PyProjectDependency]
Returns dependencies.
Sourcepub fn optional_dependency_groups(&self) -> &[PyProjectOptionalDependencyGroup]
pub fn optional_dependency_groups(&self) -> &[PyProjectOptionalDependencyGroup]
Returns optional dependency group labels.
Sourcepub fn scripts(&self) -> &[PyProjectScript]
pub fn scripts(&self) -> &[PyProjectScript]
Returns script labels.
Sourcepub fn entry_points(&self) -> &[PyProjectEntryPoint]
pub fn entry_points(&self) -> &[PyProjectEntryPoint]
Returns entry point labels.
Trait Implementations§
Source§impl Clone for PyProjectProjectMetadata
impl Clone for PyProjectProjectMetadata
Source§fn clone(&self) -> PyProjectProjectMetadata
fn clone(&self) -> PyProjectProjectMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PyProjectProjectMetadata
impl Debug for PyProjectProjectMetadata
Source§impl Default for PyProjectProjectMetadata
impl Default for PyProjectProjectMetadata
Source§fn default() -> PyProjectProjectMetadata
fn default() -> PyProjectProjectMetadata
Returns the “default value” for a type. Read more
Source§impl PartialEq for PyProjectProjectMetadata
impl PartialEq for PyProjectProjectMetadata
Source§fn eq(&self, other: &PyProjectProjectMetadata) -> bool
fn eq(&self, other: &PyProjectProjectMetadata) -> bool
Tests for
self and other values to be equal, and is used by ==.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