pub struct Context<'a> {
pub console: &'a Console,
pub width: usize,
pub height: usize,
}Expand description
What a component renders for: the console to render with, and the space it may use.
Fields§
§console: &'a Console§width: usizeColumns available.
height: usizeRows available: the terminal’s height, or the inline height the caller set. A view taller than this is cut off at the bottom.
Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Context<'a>
impl<'a> !UnwindSafe for Context<'a>
impl<'a> Freeze for Context<'a>
impl<'a> Send for Context<'a>
impl<'a> Sync for Context<'a>
impl<'a> Unpin for Context<'a>
impl<'a> UnsafeUnpin for Context<'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