Skip to main content

oo_ide/commands/
meta.rs

1use std::borrow::Cow;
2
3use super::{CommandArg, CommandId};
4
5pub enum Visibility {
6    UserVisible,
7    Hidden,
8}
9
10pub struct CommandMeta {
11    pub id: CommandId,
12    pub title: Cow<'static, str>,
13    #[allow(dead_code)]
14    pub description: Cow<'static, str>,
15    pub args: Vec<CommandArg>,
16    /// Active when `app.active_contexts ∩ contexts ≠ ∅`.
17    /// An empty list means active in **all** contexts.
18    #[allow(dead_code)]
19    pub contexts: Vec<Cow<'static, str>>,
20    pub visibility: Visibility,
21}