Struct fast_version::VersionReq
source · [−]pub struct VersionReq { /* private fields */ }
Expand description
Representing an actual version requirenment, normally constructed through VersionReq::new.
Implementations
sourceimpl VersionReq
impl VersionReq
sourcepub const STAR: VersionReq = Self::star()
pub const STAR: VersionReq = Self::star()
Equivalent of “*”
sourcepub const fn matches(&self, version: &Version) -> bool
pub const fn matches(&self, version: &Version) -> bool
checks wether the Version Requirenment matches with the version. Returns true if the Requirenments are met.
sourcepub const fn new(version_req: &VersionReqVariant) -> VersionReq
pub const fn new(version_req: &VersionReqVariant) -> VersionReq
Normal constructer of the Version Requirenment.
Trait Implementations
sourceimpl Clone for VersionReq
impl Clone for VersionReq
sourcefn clone(&self) -> VersionReq
fn clone(&self) -> VersionReq
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for VersionReq
impl Debug for VersionReq
sourceimpl Hash for VersionReq
impl Hash for VersionReq
sourceimpl Ord for VersionReq
impl Ord for VersionReq
sourceimpl PartialEq<VersionReq> for VersionReq
impl PartialEq<VersionReq> for VersionReq
sourcefn eq(&self, other: &VersionReq) -> bool
fn eq(&self, other: &VersionReq) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &VersionReq) -> bool
fn ne(&self, other: &VersionReq) -> bool
This method tests for !=
.
sourceimpl PartialOrd<VersionReq> for VersionReq
impl PartialOrd<VersionReq> for VersionReq
sourcefn partial_cmp(&self, other: &VersionReq) -> Option<Ordering>
fn partial_cmp(&self, other: &VersionReq) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for VersionReq
impl Eq for VersionReq
impl StructuralEq for VersionReq
impl StructuralPartialEq for VersionReq
Auto Trait Implementations
impl RefUnwindSafe for VersionReq
impl Send for VersionReq
impl Sync for VersionReq
impl Unpin for VersionReq
impl UnwindSafe for VersionReq
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more