Skip to main content

TerminalFrame

Struct TerminalFrame 

Source
pub struct TerminalFrame<'a> { /* private fields */ }
Expand description

Resolved layout with rects quantized to terminal cells (u16).

Created via resolve. Provides diff and inner for access to the underlying runtime state.

Implementations§

Source§

impl<'a> TerminalFrame<'a>

Source

pub fn get(&self, id: PanelId) -> Option<Rect>

Quantized rect for a panel.

Source

pub fn panels(&self) -> impl Iterator<Item = PanelEntry<'_, Rect>>

All panels with quantized rects, in kind-grouped order.

Source

pub fn overlays(&self) -> impl Iterator<Item = OverlayEntry<'_, Rect>>

Overlays with quantized rects.

Source

pub fn focused_panels( &self, focused: Option<PanelId>, ) -> impl Iterator<Item = (PanelEntry<'_, Rect>, bool)>

Panels with focus flag and quantized rects.

A panel is focused when its id matches focused, or when it is a decoration panel whose content kind matches the focused panel’s kind.

Source

pub fn render_overlays( &self, frame: &mut Frame<'_>, render: impl FnMut(&mut Frame<'_>, OverlayEntry<'_, Rect>), )

Clear underlying cells then render each overlay. Call after panels.

Source

pub fn diff(&self) -> Option<LayoutDiff<'_>>

Layout diff (panel IDs, not rects). None for stateless resolves.

Source

pub fn inner(&self) -> Option<&PanesFrame>

Raw panes Frame. None for stateless resolves.

Source

pub fn overlay_failures(&self) -> &[(OverlayId, Arc<str>, AnchorFailure)]

Overlays that failed to anchor during the most recent resolve.

Auto Trait Implementations§

§

impl<'a> Freeze for TerminalFrame<'a>

§

impl<'a> RefUnwindSafe for TerminalFrame<'a>

§

impl<'a> !Send for TerminalFrame<'a>

§

impl<'a> !Sync for TerminalFrame<'a>

§

impl<'a> Unpin for TerminalFrame<'a>

§

impl<'a> UnsafeUnpin for TerminalFrame<'a>

§

impl<'a> UnwindSafe for TerminalFrame<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.