Struct git_record::testing::CursiveTestingBackend
source · pub struct CursiveTestingBackend { /* private fields */ }Expand description
The testing backend. It feeds a predetermined list of events to the Cursive event loop and stores a virtual terminal for Cursive to draw on.
Implementations§
source§impl CursiveTestingBackend
impl CursiveTestingBackend
sourcepub fn init(events: Vec<CursiveTestingEvent>) -> Box<dyn Backend>
pub fn init(events: Vec<CursiveTestingEvent>) -> Box<dyn Backend>
Construct the testing backend with the provided set of events.
Trait Implementations§
source§impl Backend for CursiveTestingBackend
impl Backend for CursiveTestingBackend
source§fn poll_event(&mut self) -> Option<Event>
fn poll_event(&mut self) -> Option<Event>
Polls the backend for any input. Read more
source§fn has_colors(&self) -> bool
fn has_colors(&self) -> bool
Should return
true if this backend supports colors.source§fn screen_size(&self) -> Vec2
fn screen_size(&self) -> Vec2
Returns the screen size.
source§fn set_effect(&self, _effect: Effect)
fn set_effect(&self, _effect: Effect)
Enables the given effect. Read more
source§fn unset_effect(&self, _effect: Effect)
fn unset_effect(&self, _effect: Effect)
Disables the given effect.
Auto Trait Implementations§
impl !RefUnwindSafe for CursiveTestingBackend
impl !Send for CursiveTestingBackend
impl !Sync for CursiveTestingBackend
impl Unpin for CursiveTestingBackend
impl !UnwindSafe for CursiveTestingBackend
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