pub struct CommandSource {
pub view: SourceView,
pub action: SourceAction,
pub key: Option<String>,
}Expand description
The view and action that caused a command.
Fields§
§view: SourceViewSource view that owned the command action.
action: SourceActionSource action that triggered the command.
key: Option<String>Optional key binding or command key.
Implementations§
Source§impl CommandSource
impl CommandSource
Sourcepub const fn new(view: SourceView, action: SourceAction) -> Self
pub const fn new(view: SourceView, action: SourceAction) -> Self
Creates a command source without a key binding.
Trait Implementations§
Source§impl Clone for CommandSource
impl Clone for CommandSource
Source§fn clone(&self) -> CommandSource
fn clone(&self) -> CommandSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CommandSource
impl Debug for CommandSource
impl Eq for CommandSource
Source§impl PartialEq for CommandSource
impl PartialEq for CommandSource
Source§fn eq(&self, other: &CommandSource) -> bool
fn eq(&self, other: &CommandSource) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CommandSource
Auto Trait Implementations§
impl Freeze for CommandSource
impl RefUnwindSafe for CommandSource
impl Send for CommandSource
impl Sync for CommandSource
impl Unpin for CommandSource
impl UnsafeUnpin for CommandSource
impl UnwindSafe for CommandSource
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