Struct semver::Comparator [−][src]
pub struct Comparator { pub op: Op, pub major: u64, pub minor: Option<u64>, pub patch: Option<u64>, pub pre: Prerelease, }
Expand description
A pair of comparison operator and partial version, such as >=1.2
. Forms
one piece of a VersionReq.
Fields
op: Op
major: u64
minor: Option<u64>
patch: Option<u64>
Patch is only allowed if minor is Some.
pre: Prerelease
Non-empty pre-release is only allowed if patch is Some.
Implementations
impl Comparator
[src]
impl Comparator
[src]Trait Implementations
impl Clone for Comparator
[src]
impl Clone for Comparator
[src]fn clone(&self) -> Comparator
[src]
fn clone(&self) -> Comparator
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for Comparator
[src]
impl Debug for Comparator
[src]impl Display for Comparator
[src]
impl Display for Comparator
[src]impl FromIterator<Comparator> for VersionReq
[src]
impl FromIterator<Comparator> for VersionReq
[src]fn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = Comparator>,
[src]
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = Comparator>,
[src]Creates a value from an iterator. Read more
impl FromStr for Comparator
[src]
impl FromStr for Comparator
[src]impl Hash for Comparator
[src]
impl Hash for Comparator
[src]impl PartialEq<Comparator> for Comparator
[src]
impl PartialEq<Comparator> for Comparator
[src]fn eq(&self, other: &Comparator) -> bool
[src]
fn eq(&self, other: &Comparator) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &Comparator) -> bool
[src]
fn ne(&self, other: &Comparator) -> bool
[src]This method tests for !=
.
impl Eq for Comparator
[src]
impl StructuralEq for Comparator
[src]
impl StructuralPartialEq for Comparator
[src]
Auto Trait Implementations
impl RefUnwindSafe for Comparator
impl Send for Comparator
impl Sync for Comparator
impl Unpin for Comparator
impl UnwindSafe for Comparator
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more