Struct dnote_tui::app::App

source ·
pub struct App {
    pub running: bool,
    pub dnote_client: DnoteClient,
    pub selected_section: TuiSection,
    pub books: StatefulList<DnoteBook>,
    pub pages: StatefulList<DnotePage>,
    pub page_info: DnotePageInfo,
}
Expand description

Application.

Fields§

§running: bool

Is the application running?

§dnote_client: DnoteClient

Dnote Client instance

§selected_section: TuiSection

Order of TuiSection

§books: StatefulList<DnoteBook>

Books list

§pages: StatefulList<DnotePage>

Pages List

§page_info: DnotePageInfo

Page Info

Implementations§

source§

impl App

source

pub fn new() -> Self

Constructs a new instance of App.

source

pub fn tick(&self)

Handles the tick event of the terminal.

source

pub fn quit(&mut self)

Set running to false to quit the application.

source

pub fn get_books(&mut self) -> StatefulList<DnoteBook>

source

pub fn get_pages(&mut self) -> StatefulList<DnotePage>

source

pub fn get_page_content(&mut self) -> DnotePageInfo

source

pub fn select_next_section(&mut self)

source

pub fn select_prev_section(&mut self)

Trait Implementations§

source§

impl Debug for App

source§

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

Formats the value using the given formatter. Read more
source§

impl Default for App

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl RefUnwindSafe for App

§

impl Send for App

§

impl Sync for App

§

impl Unpin for App

§

impl UnwindSafe for App

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.