Struct scm_record::helpers::CrosstermInput
source · pub struct CrosstermInput;Expand description
Reads input events from the terminal using crossterm.
Its default implementation of edit_commit_message returns the provided
message unchanged.
Trait Implementations§
source§impl RecordInput for CrosstermInput
impl RecordInput for CrosstermInput
source§fn terminal_kind(&self) -> TerminalKind
fn terminal_kind(&self) -> TerminalKind
Return the kind of terminal to use.
source§fn next_events(&mut self) -> Result<Vec<Event>, RecordError>
fn next_events(&mut self) -> Result<Vec<Event>, RecordError>
Get all available user events. This should block until there is at least
one available event.
source§fn edit_commit_message(&mut self, message: &str) -> Result<String, RecordError>
fn edit_commit_message(&mut self, message: &str) -> Result<String, RecordError>
Open a commit editor and interactively edit the given message. Read more
Auto Trait Implementations§
impl RefUnwindSafe for CrosstermInput
impl Send for CrosstermInput
impl Sync for CrosstermInput
impl Unpin for CrosstermInput
impl UnwindSafe for CrosstermInput
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