pub struct KeymapEditor { /* private fields */ }Expand description
Coordinates one recorder over caller-owned keymap rows; it never applies a binding.
Implementations§
Source§impl KeymapEditor
impl KeymapEditor
pub fn new( ident: impl Into<Ident>, window: &mut Window, cx: &mut Context<'_, Self>, ) -> Self
pub fn commands(self, commands: impl IntoIterator<Item = KeymapCommand>) -> Self
pub fn query(self, query: impl Into<SharedString>) -> Self
pub fn set_commands( &mut self, commands: Vec<KeymapCommand>, cx: &mut Context<'_, Self>, )
pub fn set_query( &mut self, query: impl Into<SharedString>, cx: &mut Context<'_, Self>, )
Sourcepub fn set_disabled(&mut self, disabled: bool, cx: &mut Context<'_, Self>)
pub fn set_disabled(&mut self, disabled: bool, cx: &mut Context<'_, Self>)
Refuses every editor action without removing caller-owned bindings.
pub fn active_command(&self) -> Option<&SharedString>
pub fn current_commands(&self) -> &[KeymapCommand]
Trait Implementations§
Source§impl Debug for KeymapEditor
impl Debug for KeymapEditor
Source§impl Disableable for KeymapEditor
impl Disableable for KeymapEditor
impl EventEmitter<KeymapEditorEvent> for KeymapEditor
Source§impl Render for KeymapEditor
impl Render for KeymapEditor
Auto Trait Implementations§
impl !RefUnwindSafe for KeymapEditor
impl !Send for KeymapEditor
impl !Sync for KeymapEditor
impl !UnwindSafe for KeymapEditor
impl Freeze for KeymapEditor
impl Unpin for KeymapEditor
impl UnsafeUnpin for KeymapEditor
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more