Skip to main content

ViewDataUpdater

Struct ViewDataUpdater 

Source
pub struct ViewDataUpdater<'view_data> { /* private fields */ }
Expand description

An updater utility for a ViewData.

Implementations§

Source§

impl<'view_data> ViewDataUpdater<'view_data>

Source

pub fn clear(&mut self)

Clear content of the view data.

Source

pub fn clear_body(&mut self)

Clear just the body of the view data.

Source

pub fn ensure_line_visible(&mut self, row_index: usize)

Set the line that must be visible during render.

Source

pub fn ensure_column_visible(&mut self, column_index: usize)

Set the column to must be visible during render.

Source

pub fn set_show_title(&mut self, show: bool)

Set if to show title.

Source

pub fn set_show_help(&mut self, show: bool)

Set if to show help.

Source

pub fn push_leading_line(&mut self, view_line: ViewLine)

Push a new leading line to the view data.

Source

pub fn push_line(&mut self, view_line: ViewLine)

Push a new body line to the view data.

Source

pub fn push_lines(&mut self, lines: &str)

Push a set of new body lines to the view data automatically split on newlines.

Source

pub fn push_trailing_line(&mut self, view_line: ViewLine)

Push a new trailing line to the view data.

Source

pub fn set_retain_scroll_position(&mut self, value: bool)

Set the scroll position retain value of the view data.

Source

pub fn reset_scroll_position(&mut self)

Reset the scroll position of the view data.

Trait Implementations§

Source§

impl<'view_data> Debug for ViewDataUpdater<'view_data>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'view_data> !UnwindSafe for ViewDataUpdater<'view_data>

§

impl<'view_data> Freeze for ViewDataUpdater<'view_data>

§

impl<'view_data> RefUnwindSafe for ViewDataUpdater<'view_data>

§

impl<'view_data> Send for ViewDataUpdater<'view_data>

§

impl<'view_data> Sync for ViewDataUpdater<'view_data>

§

impl<'view_data> Unpin for ViewDataUpdater<'view_data>

§

impl<'view_data> UnsafeUnpin for ViewDataUpdater<'view_data>

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.