pub enum LineResult<R> {
Help,
Cancel,
Exit,
Class,
Action(R),
Unrecognized,
}Expand description
The result variants of parse_line.
Variants§
Help
help command reached.
Cancel
cancel commannd reached.
Exit
exit command reached.
Class
Navigated to a class.
Action(R)
Action invoked. The inner data is the returned data from invocation.
Unrecognized
No commands recognised.
Implementations§
Source§impl<R> LineResult<R>
impl<R> LineResult<R>
Sourcepub fn action_result(self) -> Option<R>
pub fn action_result(self) -> Option<R>
Converts the LineResult into the data returned from invoking an action.
If the result was not an action, None is returned.
Trait Implementations§
Source§impl<R: Debug> Debug for LineResult<R>
impl<R: Debug> Debug for LineResult<R>
Source§impl<R: PartialEq> PartialEq for LineResult<R>
impl<R: PartialEq> PartialEq for LineResult<R>
impl<R> StructuralPartialEq for LineResult<R>
Auto Trait Implementations§
impl<R> Freeze for LineResult<R>where
R: Freeze,
impl<R> RefUnwindSafe for LineResult<R>where
R: RefUnwindSafe,
impl<R> Send for LineResult<R>where
R: Send,
impl<R> Sync for LineResult<R>where
R: Sync,
impl<R> Unpin for LineResult<R>where
R: Unpin,
impl<R> UnwindSafe for LineResult<R>where
R: UnwindSafe,
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