pub struct VersionArg(/* private fields */);Expand description
Validated crate version token (latest, channel, or SemVer without v prefix).
Implementations§
Source§impl VersionArg
impl VersionArg
Sourcepub fn parse_opt(raw: Option<&str>) -> AppResult<Self>
pub fn parse_opt(raw: Option<&str>) -> AppResult<Self>
Parse optional CLI version; empty/None → latest.
§Errors
Propagates ErrorKind::InvalidInput from Self::parse when the
provided token is present and invalid.
Sourcepub fn parse(v: &str) -> AppResult<Self>
pub fn parse(v: &str) -> AppResult<Self>
Parses a non-optional version token.
§Errors
Returns ErrorKind::InvalidInput for unknown channels, v-prefixed
SemVer, build metadata, or malformed versions.
Sourcepub fn stdlib_channel(&self) -> &str
pub fn stdlib_channel(&self) -> &str
Map to rustdoc channel for stdlib paths (latest → stable).
Single source of truth for channel mapping (TYPE-L-010).
Trait Implementations§
Source§impl AsRef<str> for VersionArg
impl AsRef<str> for VersionArg
Source§impl Clone for VersionArg
impl Clone for VersionArg
Source§fn clone(&self) -> VersionArg
fn clone(&self) -> VersionArg
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 VersionArg
impl Debug for VersionArg
Source§impl Display for VersionArg
impl Display for VersionArg
impl Eq for VersionArg
Source§impl FromStr for VersionArg
impl FromStr for VersionArg
Source§impl Hash for VersionArg
impl Hash for VersionArg
Source§impl PartialEq for VersionArg
impl PartialEq for VersionArg
impl StructuralPartialEq for VersionArg
Auto Trait Implementations§
impl Freeze for VersionArg
impl RefUnwindSafe for VersionArg
impl Send for VersionArg
impl Sync for VersionArg
impl Unpin for VersionArg
impl UnsafeUnpin for VersionArg
impl UnwindSafe for VersionArg
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more