Skip to main content

Frame

Struct Frame 

Source
pub struct Frame<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> Frame<'a>

Source

pub fn area(&self) -> Rect

Source

pub fn buffer(&mut self) -> &mut Buffer

Source

pub fn frame_count(&self) -> u64

Source

pub fn set_cursor_position(&mut self, x: u16, y: u16)

Source

pub fn cursor_position(&self) -> Option<(u16, u16)>

Source

pub fn render_widget<W>(&mut self, widget: W, area: Rect)
where W: Widget,

Source

pub fn render_widget_timed<N, W>(&mut self, name: N, widget: W, area: Rect)
where N: Into<Cow<'static, str>>, W: Widget,

Source

pub fn time_named<N, R>(&mut self, name: N, f: impl FnOnce(&mut Self) -> R) -> R
where N: Into<Cow<'static, str>>,

Source

pub fn time_pane<R>( &mut self, name: impl Into<Cow<'static, str>>, area: Rect, f: impl FnOnce(&mut Self) -> R, ) -> R

Source

pub fn diagnostics(&self) -> &[FrameDiagnostic]

Source

pub fn register_hit_region(&mut self, region: HitRegion) -> &HitRegion

Source

pub fn register_metadata_region( &mut self, area: Rect, metadata: WidgetMetadata, ) -> &HitRegion

Source

pub fn register_selectable_span( &mut self, span: SelectableSpan, ) -> &SelectableSpan

Source

pub fn register_scroll_region( &mut self, id: impl Into<WidgetId>, viewport: Rect, scroll_offset: usize, rows: Vec<ScrollRowHit>, )

Source

pub fn interaction_layer(&self) -> &InteractionLayer

Source

pub fn interaction_layer_mut(&mut self) -> &mut InteractionLayer

Source

pub fn mark_dirty(&mut self, area: Rect)

Source

pub fn dirty_regions(&self) -> &[Rect]

Auto Trait Implementations§

§

impl<'a> !UnwindSafe for Frame<'a>

§

impl<'a> Freeze for Frame<'a>

§

impl<'a> RefUnwindSafe for Frame<'a>

§

impl<'a> Send for Frame<'a>

§

impl<'a> Sync for Frame<'a>

§

impl<'a> Unpin for Frame<'a>

§

impl<'a> UnsafeUnpin for Frame<'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, 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.