[−][src]Enum gong::analysis::ItemClass
The possible classes of items identified and extracted from command line arguments.
This breaks down items to three classes - okay/warn/error - with each variant holding an
Item
, ItemW
or ItemE
variant which more specifically represents what was found.
We use a class wrapper rather than grouping items into separate vectors because a single vector preserves order more simply. We break up item variants into groups for the advantages in matching.
All sub-variants hold a usize
value to be used for indicating the index of the argument at
which the item was found.
Most sub-variants also hold additional data. Long option sub-variants hold a string slice
reference to the matched option. Short option sub-variants hold the char
matched. Options with
data arguments additionally hold a string slice reference to the data string matched, and in
some cases also a DataLocation
variant. The NonOption
sub-variant holds a string slice
reference to the matched string.
Variants
Ok(Item<'a>)
Non-problematic item
Warn(ItemW<'a>)
Warn-level item
Err(ItemE<'a>)
Error-level item
Trait Implementations
impl<'a> Clone for ItemClass<'a>
[src]
impl<'a> Copy for ItemClass<'a>
[src]
impl<'a> Debug for ItemClass<'a>
[src]
impl<'a> Eq for ItemClass<'a>
[src]
impl<'a> PartialEq<ItemClass<'a>> for ItemClass<'a>
[src]
pub fn eq(&self, other: &ItemClass<'a>) -> bool
[src]
pub fn ne(&self, other: &ItemClass<'a>) -> bool
[src]
impl<'a> StructuralEq for ItemClass<'a>
[src]
impl<'a> StructuralPartialEq for ItemClass<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for ItemClass<'a>
[src]
impl<'a> Send for ItemClass<'a>
[src]
impl<'a> Sync for ItemClass<'a>
[src]
impl<'a> Unpin for ItemClass<'a>
[src]
impl<'a> UnwindSafe for ItemClass<'a>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,