pub enum MatchAction {
Keep,
Drop,
}Expand description
Action to take on targets when filtering with a regular expression.
Variants§
Keep
Keep targets of the regular expression.
§Example: Using action!
use editor_types::prelude::*;
use editor_types::{action, Action, SelectionAction};
let act = SelectionAction::Filter(MatchAction::Keep);
let split: Action = action!("selection filter -F keep");
assert_eq!(split, act.into());Drop
Remove targets of the regular expression.
§Example: Using action!
use editor_types::prelude::*;
use editor_types::{action, Action, SelectionAction};
let act = SelectionAction::Filter(MatchAction::Drop);
let split: Action = action!("selection filter -F drop");
assert_eq!(split, act.into());Implementations§
Source§impl MatchAction
impl MatchAction
Sourcepub fn is_keep(&self) -> bool
pub fn is_keep(&self) -> bool
Whether this action is MatchAction::Keep.
Sourcepub fn is_drop(&self) -> bool
pub fn is_drop(&self) -> bool
Whether this action is MatchAction::Drop.
Trait Implementations§
Source§impl Clone for MatchAction
impl Clone for MatchAction
Source§fn clone(&self) -> MatchAction
fn clone(&self) -> MatchAction
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 MatchAction
impl Debug for MatchAction
Source§impl PartialEq for MatchAction
impl PartialEq for MatchAction
impl Copy for MatchAction
impl Eq for MatchAction
impl StructuralPartialEq for MatchAction
Auto Trait Implementations§
impl Freeze for MatchAction
impl RefUnwindSafe for MatchAction
impl Send for MatchAction
impl Sync for MatchAction
impl Unpin for MatchAction
impl UnwindSafe for MatchAction
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