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 Freeze for CrosstermInput
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
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