pub struct AddCommandApp {
pub command: String,
pub tags: Vec<String>,
pub current_tag: String,
pub command_cursor: usize,
pub command_line: usize,
pub input_mode: InputMode,
pub suggested_tags: Vec<String>,
pub previous_mode: InputMode,
}
Fields§
§command: String
The command being entered
Tags for the command
current_tag: String
Current tag being entered
command_cursor: usize
Current cursor position in the command
command_line: usize
Current line in multi-line command
input_mode: InputMode
Current input mode
Suggested tags
previous_mode: InputMode
Previous input mode (for returning from help)
Implementations§
Source§impl AddCommandApp
impl AddCommandApp
pub fn new() -> Self
pub fn run(&mut self) -> Result<CommandResult>
pub fn set_command(&mut self, command: String)
pub fn handle_key_event(&mut self, key: KeyEvent)
Trait Implementations§
Source§impl Default for AddCommandApp
impl Default for AddCommandApp
Source§fn default() -> AddCommandApp
fn default() -> AddCommandApp
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AddCommandApp
impl RefUnwindSafe for AddCommandApp
impl Send for AddCommandApp
impl Sync for AddCommandApp
impl Unpin for AddCommandApp
impl UnwindSafe for AddCommandApp
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
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