pub struct Frame<'a, B>where
B: Backend + 'a,{ /* private fields */ }Expand description
Represents a consistent terminal interface for rendering.
Implementations§
Source§impl<'a, B> Frame<'a, B>where
B: Backend,
impl<'a, B> Frame<'a, B>where
B: Backend,
Sourcepub fn render_widget<W>(&mut self, widget: &mut W, area: Rect)where
W: Widget,
pub fn render_widget<W>(&mut self, widget: &mut W, area: Rect)where
W: Widget,
Render a Widget to the current buffer using Widget::render.
§Examples
let mut block = Block::default();
let area = Rect::new(0, 0, 5, 5);
let mut frame = terminal.get_frame();
frame.render_widget(&mut block, area);pub fn current_buffer_mut(&mut self) -> &mut Buffer
Sourcepub fn set_cursor(&mut self, x: u16, y: u16)
pub fn set_cursor(&mut self, x: u16, y: u16)
After drawing this frame, make the cursor visible and put it at the specified (x, y) coordinates. If this method is not called, the cursor will be hidden.
Note that this will interfere with calls to Terminal::hide_cursor(),
Terminal::show_cursor(), and Terminal::set_cursor(). Pick one of the APIs and stick
with it.
Auto Trait Implementations§
impl<'a, B> Freeze for Frame<'a, B>
impl<'a, B> RefUnwindSafe for Frame<'a, B>where
B: RefUnwindSafe,
impl<'a, B> Send for Frame<'a, B>where
B: Send,
impl<'a, B> Sync for Frame<'a, B>where
B: Sync,
impl<'a, B> Unpin for Frame<'a, B>
impl<'a, B> UnsafeUnpin for Frame<'a, B>
impl<'a, B> !UnwindSafe for Frame<'a, B>
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