pub struct CommandHistory<const N: usize, const INPUT_SIZE: usize> { /* private fields */ }Expand description
Command history storage (ring buffer when enabled, zero-size stub when disabled).
Implementations§
Source§impl<const N: usize, const INPUT_SIZE: usize> CommandHistory<N, INPUT_SIZE>
impl<const N: usize, const INPUT_SIZE: usize> CommandHistory<N, INPUT_SIZE>
Sourcepub fn previous_command(&mut self) -> Option<String<INPUT_SIZE>>
pub fn previous_command(&mut self) -> Option<String<INPUT_SIZE>>
Navigate to previous command (up arrow).
Sourcepub fn next_command(&mut self) -> Option<String<INPUT_SIZE>>
pub fn next_command(&mut self) -> Option<String<INPUT_SIZE>>
Navigate to next command (down arrow).
Sourcepub fn reset_position(&mut self)
pub fn reset_position(&mut self)
Reset navigation position.
Trait Implementations§
Auto Trait Implementations§
impl<const N: usize, const INPUT_SIZE: usize> Freeze for CommandHistory<N, INPUT_SIZE>
impl<const N: usize, const INPUT_SIZE: usize> RefUnwindSafe for CommandHistory<N, INPUT_SIZE>
impl<const N: usize, const INPUT_SIZE: usize> Send for CommandHistory<N, INPUT_SIZE>
impl<const N: usize, const INPUT_SIZE: usize> Sync for CommandHistory<N, INPUT_SIZE>
impl<const N: usize, const INPUT_SIZE: usize> Unpin for CommandHistory<N, INPUT_SIZE>
impl<const N: usize, const INPUT_SIZE: usize> UnwindSafe for CommandHistory<N, INPUT_SIZE>
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