pub struct Warning<'t> {
pub kind: WarningKind,
pub name: &'t str,
pub message: Option<&'t str>,
pub warn_at: Option<&'t str>,
pub remove_at: Option<&'t str>,
pub replacement: Option<&'t str>,
}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: &'t strWhat the user typed or set: --old-flag, old-cmd, OLD_ENV.
message: Option<&'t str>The author’s reason, when the declaration carries one.
warn_at: Option<&'t str>The release warnings start at. A warning that is here has already passed it.
remove_at: Option<&'t str>The release the declaration goes away in, when the author has named one.
replacement: Option<&'t str>What to use instead, when the declaration implies one — the current variable, for a deprecated environment alias.
Implementations§
Source§impl<'t> Warning<'t>
impl<'t> Warning<'t>
Sourcepub const fn flag(
name: &'t str,
message: Option<&'t str>,
warn_at: Option<&'t str>,
remove_at: Option<&'t str>,
) -> Warning<'t>
pub const fn flag( name: &'t str, message: Option<&'t str>, warn_at: Option<&'t str>, remove_at: Option<&'t str>, ) -> Warning<'t>
A deprecated flag that was given.
Trait Implementations§
impl<'t> Copy for Warning<'t>
impl<'t> Eq for Warning<'t>
impl<'t> StructuralPartialEq for Warning<'t>
Auto Trait Implementations§
impl<'t> Freeze for Warning<'t>
impl<'t> RefUnwindSafe for Warning<'t>
impl<'t> Send for Warning<'t>
impl<'t> Sync for Warning<'t>
impl<'t> Unpin for Warning<'t>
impl<'t> UnsafeUnpin for Warning<'t>
impl<'t> UnwindSafe for Warning<'t>
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