pub enum AutoAction {
On,
Off,
Status,
Missing,
Unknown(String),
}Expand description
The /auto subcommand.
Only AutoAction::On is risk-increasing; the others are
Neutral. AutoAction::Missing models a bare /auto so the
dispatcher can emit a usage hint instead of silently toggling.
AutoAction::Unknown preserves the typed token so the hint
can quote it back.
Variants§
Implementations§
Source§impl AutoAction
impl AutoAction
Sourcepub const fn is_risk_increasing(&self) -> bool
pub const fn is_risk_increasing(&self) -> bool
true when the action flips auto-acceptance from off to on.
The dispatcher’s risk() function keys off this so the
friction ladder gates /auto on but not /auto off|status.
Trait Implementations§
Source§impl Clone for AutoAction
impl Clone for AutoAction
Source§fn clone(&self) -> AutoAction
fn clone(&self) -> AutoAction
Returns a duplicate of the value. Read more
1.0.0 · 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 AutoAction
impl Debug for AutoAction
Source§impl PartialEq for AutoAction
impl PartialEq for AutoAction
impl Eq for AutoAction
impl StructuralPartialEq for AutoAction
Auto Trait Implementations§
impl Freeze for AutoAction
impl RefUnwindSafe for AutoAction
impl Send for AutoAction
impl Sync for AutoAction
impl Unpin for AutoAction
impl UnsafeUnpin for AutoAction
impl UnwindSafe for AutoAction
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