pub struct Warning {
pub kind: WarningKind,
pub name: String,
pub message: Option<String>,
pub warn_at: Option<String>,
pub remove_at: Option<String>,
pub replacement: Option<String>,
}Expand description
One thing a command line used that its own spec says not to use any more.
Fields§
§kind: WarningKindWhat sort of declaration it was, for a caller that treats them differently.
name: StringWhat the user typed or set: --old-flag, old-cmd, OLD_ENV.
message: Option<String>The author’s reason, when the declaration carries one.
warn_at: Option<String>The release warnings start at. A warning that is here has already passed it.
remove_at: Option<String>The release the declaration goes away in, when the author has named one.
replacement: Option<String>What to use instead, when the declaration implies one.
Implementations§
Source§impl Warning
impl Warning
Sourcepub fn flag(
name: impl Into<String>,
message: Option<String>,
warn_at: Option<String>,
remove_at: Option<String>,
) -> Self
pub fn flag( name: impl Into<String>, message: Option<String>, warn_at: Option<String>, remove_at: Option<String>, ) -> Self
A deprecated flag that was given, named as the user names it.
Sourcepub fn command(
name: impl Into<String>,
message: Option<String>,
warn_at: Option<String>,
remove_at: Option<String>,
) -> Self
pub fn command( name: impl Into<String>, message: Option<String>, warn_at: Option<String>, remove_at: Option<String>, ) -> Self
A deprecated command that was selected.
Trait Implementations§
impl Eq for Warning
impl StructuralPartialEq for Warning
Auto Trait Implementations§
impl Freeze for Warning
impl RefUnwindSafe for Warning
impl Send for Warning
impl Sync for Warning
impl Unpin for Warning
impl UnsafeUnpin for Warning
impl UnwindSafe for Warning
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> 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