pub struct Headless<A: App> { /* private fields */ }Expand description
Drives an App the way the event loop does, minus the terminal.
Implementations§
Source§impl<A: App> Headless<A>
impl<A: App> Headless<A>
Sourcepub fn type_bytes(&mut self, bytes: &[u8])
pub fn type_bytes(&mut self, bytes: &[u8])
Feed bytes as if typed, with a lone escape counting as Esc.
Sourcepub fn input(&mut self, event: InputEvent)
pub fn input(&mut self, event: InputEvent)
Deliver one input event; answers to pacing queries stay with the loop, as they do on a terminal.
Sourcepub fn deliver_messages(&mut self)
pub fn deliver_messages(&mut self)
Deliver every message the app’s threads queued so far.
Sourcepub fn resize(&mut self, size: CellSize)
pub fn resize(&mut self, size: CellSize)
Resize the screen and let it settle, the way a window resize ends.
Trait Implementations§
Auto Trait Implementations§
impl<A> !Sync for Headless<A>
impl<A> Forget for Headless<A>
impl<A> Freeze for Headless<A>
impl<A> Move for Headless<A>
impl<A> RefUnwindSafe for Headless<A>
impl<A> Send for Headless<A>
impl<A> Unpin for Headless<A>
impl<A> UnsafeUnpin for Headless<A>
impl<A> UnwindSafe for Headless<A>
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