Struct andiskaz::terminal::TerminalGuard
source · pub struct TerminalGuard<'terminal> { /* private fields */ }
Expand description
A guard on a locked terminal handle.
Screen is locked, event channel is locked.
Implementations§
source§impl<'terminal> TerminalGuard<'terminal>
impl<'terminal> TerminalGuard<'terminal>
sourcepub fn event(&mut self) -> Option<Event>
pub fn event(&mut self) -> Option<Event>
Reads the last event. When this method is called, the event is marked as read, and in subsequent locks to the terminal handle, it won’t be available. If not called and no other event arrives, this will not be marked as read and it will be available in the next locking.
Trait Implementations§
Auto Trait Implementations§
impl<'terminal> !RefUnwindSafe for TerminalGuard<'terminal>
impl<'terminal> Send for TerminalGuard<'terminal>
impl<'terminal> Sync for TerminalGuard<'terminal>
impl<'terminal> Unpin for TerminalGuard<'terminal>
impl<'terminal> !UnwindSafe for TerminalGuard<'terminal>
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
source§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.