pub struct TestingInput {
pub width: usize,
pub height: usize,
pub events: Box<dyn Iterator<Item = Event>>,
pub commit_messages: VecDeque<String>,
}
Expand description
Reads events from the provided sequence of events.
Fields§
§width: usize
The width of the virtual terminal in columns.
height: usize
The height of the virtual terminal in columns.
events: Box<dyn Iterator<Item = Event>>
The sequence of events to emit.
commit_messages: VecDeque<String>
Commit messages to use when the commit editor is opened.
Implementations§
Source§impl TestingInput
impl TestingInput
Trait Implementations§
Source§impl RecordInput for TestingInput
impl RecordInput for TestingInput
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 TestingInput
impl !RefUnwindSafe for TestingInput
impl !Send for TestingInput
impl !Sync for TestingInput
impl Unpin for TestingInput
impl !UnwindSafe for TestingInput
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