pub enum CommandBarAction<I: ApplicationInfo> {
Focus(String, CommandType, Box<Action<I>>),
Unfocus,
}Expand description
Actions for manipulating the application’s command bar.
Variants§
Focus(String, CommandType, Box<Action<I>>)
Focus the command bar
§Example: Using action!
use editor_types::prelude::*;
use editor_types::{action, Action, CommandBarAction};
let focus: Action = action!(r#"cmdbar focus -p "/" -s search -a (search -d same)"#);
assert_eq!(focus, CommandBarAction::Focus(
"/".into(),
CommandType::Search,
Action::Search(MoveDirMod::Same, Count::Contextual).into(),
).into());Unfocus
Unfocus the command bar.
§Example: Using action!
use editor_types::prelude::*;
use editor_types::{action, Action, CommandBarAction};
let unfocus: Action = action!("cmdbar unfocus");
assert_eq!(unfocus, CommandBarAction::Unfocus.into());Trait Implementations§
Source§impl<I: Clone + ApplicationInfo> Clone for CommandBarAction<I>
impl<I: Clone + ApplicationInfo> Clone for CommandBarAction<I>
Source§fn clone(&self) -> CommandBarAction<I>
fn clone(&self) -> CommandBarAction<I>
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<I: Debug + ApplicationInfo> Debug for CommandBarAction<I>
impl<I: Debug + ApplicationInfo> Debug for CommandBarAction<I>
Source§impl<I: ApplicationInfo> From<CommandBarAction<I>> for Action<I>
impl<I: ApplicationInfo> From<CommandBarAction<I>> for Action<I>
Source§fn from(act: CommandBarAction<I>) -> Self
fn from(act: CommandBarAction<I>) -> Self
Converts to this type from the input type.
Source§impl<I: PartialEq + ApplicationInfo> PartialEq for CommandBarAction<I>
impl<I: PartialEq + ApplicationInfo> PartialEq for CommandBarAction<I>
impl<I: Eq + ApplicationInfo> Eq for CommandBarAction<I>
impl<I: ApplicationInfo> StructuralPartialEq for CommandBarAction<I>
Auto Trait Implementations§
impl<I> Freeze for CommandBarAction<I>
impl<I> RefUnwindSafe for CommandBarAction<I>where
<I as ApplicationInfo>::Action: RefUnwindSafe,
<I as ApplicationInfo>::WindowId: RefUnwindSafe,
impl<I> Send for CommandBarAction<I>
impl<I> Sync for CommandBarAction<I>
impl<I> Unpin for CommandBarAction<I>
impl<I> UnwindSafe for CommandBarAction<I>
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