#[non_exhaustive]pub struct RenderContext {
pub terminal_width: u16,
}Expand description
Per-render layout state the engine builds once per call and threads
into every Segment::render. Distinct from DataContext, which
is the data layer (one instance per process invocation, shared
across segments). RenderContext is the layout layer: terminal
width today, room for line index / capability / neighbor info as
dynamic-segment work lands.
#[non_exhaustive] keeps future additions SemVer-safe; segments
that don’t read the field accept it as _rc: &RenderContext and
pay nothing.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.terminal_width: u16Total cells available to this line. Sourced from the terminal, or the schema-defined fallback (200) when stdout is detached.
Implementations§
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RenderContext
impl Debug for RenderContext
Source§impl PartialEq for RenderContext
impl PartialEq for RenderContext
Source§fn eq(&self, other: &RenderContext) -> bool
fn eq(&self, other: &RenderContext) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for RenderContext
impl Eq for RenderContext
impl StructuralPartialEq for RenderContext
Auto 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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.