Struct Comparator
struct Comparator { ... }
A pair of comparison operator and partial version, such as >=1.2. Forms
one piece of a VersionReq.
Fields
op: Opmajor: u64minor: Option<u64>patch: Option<u64>Patch is only allowed if minor is Some.
pre: PrereleaseNon-empty pre-release is only allowed if patch is Some.
Implementations
impl Comparator
fn parse(text: &str) -> Result<Self, Error>fn matches(self: &Self, version: &Version) -> bool
impl Clone for Comparator
fn clone(self: &Self) -> Comparator
impl Debug for Comparator
fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl Display for crate::Comparator
fn fmt(self: &Self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result
impl Eq for Comparator
impl Freeze for Comparator
impl FromStr for crate::Comparator
fn from_str(text: &str) -> Result<Self, <Self as >::Err>
impl Hash for Comparator
fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)
impl PartialEq for Comparator
fn eq(self: &Self, other: &Comparator) -> bool
impl RefUnwindSafe for Comparator
impl Send for Comparator
impl Serialize for crate::Comparator
fn serialize<S>(self: &Self, serializer: S) -> Result<<S as >::Ok, <S as >::Error> where S: Serializer
impl StructuralPartialEq for Comparator
impl Sync for Comparator
impl Unpin for Comparator
impl UnwindSafe for Comparator
impl<'de> Deserialize for crate::Comparator
fn deserialize<D>(deserializer: D) -> Result<Self, <D as >::Error> where D: Deserializer<'de>
impl<T> Any for Comparator
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Comparator
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Comparator
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Comparator
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> DeserializeOwned for Comparator
impl<T> From for Comparator
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Comparator
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T> ToString for Comparator
fn to_string(self: &Self) -> String
impl<T, U> Into for Comparator
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Comparator
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Comparator
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>