pub struct Versioning(/* private fields */);Expand description
Describes how a crate::Change affects the version of relevant packages.
This is guaranteed to never be empty, as a changeset must always apply to at least one package.
Implementations§
Source§impl Versioning
impl Versioning
Sourcepub fn try_from_iter<Key, Value, ParseError, Iter>(
iter: Iter,
) -> Result<Self, BuildVersioningError>where
Key: Into<PackageName>,
Value: TryInto<ChangeType, Error = ParseError>,
ParseError: Into<BuildVersioningError>,
Iter: IntoIterator<Item = (Key, Value)>,
pub fn try_from_iter<Key, Value, ParseError, Iter>(
iter: Iter,
) -> Result<Self, BuildVersioningError>where
Key: Into<PackageName>,
Value: TryInto<ChangeType, Error = ParseError>,
ParseError: Into<BuildVersioningError>,
Iter: IntoIterator<Item = (Key, Value)>,
Creates a new Versioning from an iterator of tuples.
§Errors
- If the iterator is empty, you’ll get
BuildVersioningError::EmptyVersioningError.
pub fn iter(&self) -> impl Iterator<Item = (&PackageName, &ChangeType)>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for Versioning
impl Clone for Versioning
Source§fn clone(&self) -> Versioning
fn clone(&self) -> Versioning
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 moreSource§impl Debug for Versioning
impl Debug for Versioning
Source§impl From<(&str, ChangeType)> for Versioning
impl From<(&str, ChangeType)> for Versioning
Source§fn from(value: (&str, ChangeType)) -> Self
fn from(value: (&str, ChangeType)) -> Self
Converts to this type from the input type.
Source§impl From<(String, ChangeType)> for Versioning
impl From<(String, ChangeType)> for Versioning
Source§fn from(value: (PackageName, ChangeType)) -> Self
fn from(value: (PackageName, ChangeType)) -> Self
Converts to this type from the input type.
Source§impl FromIterator<(String, ChangeType)> for Versioning
impl FromIterator<(String, ChangeType)> for Versioning
Source§fn from_iter<T: IntoIterator<Item = (PackageName, ChangeType)>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = (PackageName, ChangeType)>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl IntoIterator for Versioning
impl IntoIterator for Versioning
Source§impl PartialEq for Versioning
impl PartialEq for Versioning
impl Eq for Versioning
impl StructuralPartialEq for Versioning
Auto Trait Implementations§
impl Freeze for Versioning
impl RefUnwindSafe for Versioning
impl Send for Versioning
impl Sync for Versioning
impl Unpin for Versioning
impl UnwindSafe for Versioning
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