pub struct Palette { /* private fields */ }Expand description
A searchable command palette.
Implementations§
Source§impl Palette
impl Palette
Sourcepub fn add(&mut self, entry: PaletteEntry)
pub fn add(&mut self, entry: PaletteEntry)
Add an entry.
Sourcepub fn add_workspace_resources(&mut self, workspace: &Expr)
pub fn add_workspace_resources(&mut self, workspace: &Expr)
Add a resource entry per open pane in a workspace.
Sourcepub fn entries(&self) -> &[PaletteEntry]
pub fn entries(&self) -> &[PaletteEntry]
All entries.
Sourcepub fn search(&self, query: &str) -> Vec<&PaletteEntry>
pub fn search(&self, query: &str) -> Vec<&PaletteEntry>
Search the palette, returning matching entries best first.
Sourcepub fn scene(&self, query: &str) -> Expr
pub fn scene(&self, query: &str) -> Expr
Render the palette (query field plus the result list) as a Scene.
Sourcepub fn open_entry(&self, entry: &PaletteEntry, pane: &str) -> Expr
pub fn open_entry(&self, entry: &PaletteEntry, pane: &str) -> Expr
Build the Intent that opens an entry into a pane: resources, cards, and recents open the value (the dispatcher picks the best lens); a lens entry switches the active lens; a command invokes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Palette
impl RefUnwindSafe for Palette
impl Send for Palette
impl Sync for Palette
impl Unpin for Palette
impl UnsafeUnpin for Palette
impl UnwindSafe for Palette
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