#[non_exhaustive]pub enum VersionReq {
Exact(String),
Prefix(String),
Latest,
Lts,
Channel(String),
Range(String),
System,
}Expand description
A version request as written in vanta.toml or on the CLI.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Exact(String)
A fully-specified version, e.g. 24.3.0.
Prefix(String)
A prefix match, e.g. 24 or 24.3.
Latest
The newest stable version.
Lts
The newest long-term-support version (provider-defined).
Channel(String)
A named channel, e.g. stable or nightly.
Range(String)
A SemVer range, e.g. ^24 or >=20 <24.
System
Use a system-provided tool.
Implementations§
Source§impl VersionReq
impl VersionReq
Sourcepub fn parse(s: &str) -> VersionReq
pub fn parse(s: &str) -> VersionReq
Parse the version portion of a request. This never fails; an unrecognized token is treated as a channel name (resolution decides if it exists).
Trait Implementations§
Source§impl Clone for VersionReq
impl Clone for VersionReq
Source§fn clone(&self) -> VersionReq
fn clone(&self) -> VersionReq
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 VersionReq
impl Debug for VersionReq
Source§impl Display for VersionReq
impl Display for VersionReq
impl Eq for VersionReq
Source§impl PartialEq for VersionReq
impl PartialEq for VersionReq
Source§fn eq(&self, other: &VersionReq) -> bool
fn eq(&self, other: &VersionReq) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for VersionReq
Auto Trait Implementations§
impl Freeze for VersionReq
impl RefUnwindSafe for VersionReq
impl Send for VersionReq
impl Sync for VersionReq
impl Unpin for VersionReq
impl UnsafeUnpin for VersionReq
impl UnwindSafe for VersionReq
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