pub struct RenderContext<'a, Global> {
pub g: &'a mut Global,
pub count: usize,
pub cursor: Option<(u16, u16)>,
}Expand description
Application context data when rendering.
Fields§
§g: &'a mut GlobalSome global state for the application.
count: usizeFrame counter.
cursor: Option<(u16, u16)>Output cursor position. Set after rendering is complete.
Implementations§
source§impl<'a, Global> RenderContext<'a, Global>
impl<'a, Global> RenderContext<'a, Global>
sourcepub fn set_screen_cursor(&mut self, cursor: Option<(u16, u16)>)
pub fn set_screen_cursor(&mut self, cursor: Option<(u16, u16)>)
Set the cursor, if the given value is Some.
Trait Implementations§
Auto Trait Implementations§
impl<'a, Global> Freeze for RenderContext<'a, Global>
impl<'a, Global> RefUnwindSafe for RenderContext<'a, Global>where
Global: RefUnwindSafe,
impl<'a, Global> Send for RenderContext<'a, Global>where
Global: Send,
impl<'a, Global> Sync for RenderContext<'a, Global>where
Global: Sync,
impl<'a, Global> Unpin for RenderContext<'a, Global>
impl<'a, Global> !UnwindSafe for RenderContext<'a, Global>
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> 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