pub struct RenderContext {
pub base_style: Style,
pub focused: bool,
pub terminal_width: u16,
pub terminal_height: u16,
pub tick: usize,
}Expand description
Context passed to a plugin during rendering.
Contains frame metadata and the base style the host wants the plugin
to use. Plugins should respect base_style for theme consistency,
but it’s not enforced at the type level — this is a convention.
The context is theme-agnostic: the host sets base_style from
whatever styling system it uses (themekit, raw Style, custom).
Fields§
§base_style: StyleBase style (background + foreground) from the host’s theme.
Plugins should apply this as the default style for their zone to maintain visual consistency with the rest of the application.
focused: boolWhether this zone currently has keyboard focus.
terminal_width: u16Terminal width (for responsive rendering decisions).
terminal_height: u16Terminal height.
tick: usizeCurrent tick count (for animations).
Implementations§
Source§impl RenderContext
impl RenderContext
Trait Implementations§
Source§impl Clone for RenderContext
impl Clone for RenderContext
Source§fn clone(&self) -> RenderContext
fn clone(&self) -> RenderContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RenderContext
impl RefUnwindSafe for RenderContext
impl Send for RenderContext
impl Sync for RenderContext
impl Unpin for RenderContext
impl UnsafeUnpin for RenderContext
impl UnwindSafe for RenderContext
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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