Skip to main content

TuiPages

Struct TuiPages 

Source
pub struct TuiPages<V, A, S, Pages = (), Handler = (), O = (), M = ()> {
    pub input: InputPipeline<A>,
    pub commands: CommandResolver<A>,
    pub focus: FocusManager<O, M>,
    pub buffer: BufferState<V>,
    /* private fields */
}

Fields§

§input: InputPipeline<A>§commands: CommandResolver<A>§focus: FocusManager<O, M>§buffer: BufferState<V>

Implementations§

Source§

impl<V, A, S, O, M> TuiPages<V, A, S, (), (), O, M>
where V: Clone + PartialEq,

Source

pub fn builder(initial_view: V) -> TuiPagesBuilder<V, A, S, O, M, (), ()>

Source§

impl<V, A, S, Pages, Handler, O, M> TuiPages<V, A, S, Pages, Handler, O, M>
where V: Clone + PartialEq, A: Clone, O: Clone + PartialEq, Pages: PageProvider<V, S, O>, Handler: TuiActionHandler<V, A, S, O, M>,

Source

pub fn current_view(&self) -> &V

Source

pub fn pages(&self) -> &Pages

Source

pub fn pages_mut(&mut self) -> &mut Pages

Source

pub fn handler(&self) -> &Handler

Source

pub fn handler_mut(&mut self) -> &mut Handler

Source

pub fn refresh_page(&mut self, state: &S)

Source

pub fn handle_key( &mut self, key: KeyEvent, state: &mut S, ) -> TuiPagesResult<TuiPagesOutput<A>, Handler::Error>

Source

pub fn submit_command( &mut self, input: &str, state: &mut S, ) -> TuiPagesResult<TuiPagesOutput<A>, Handler::Error>

Source

pub fn apply_effect(&mut self, effect: TuiEffect<V, O, M>, state: &S) -> bool

Trait Implementations§

Source§

impl<V: Clone, A: Clone, S: Clone, Pages: Clone, Handler: Clone, O: Clone, M: Clone> Clone for TuiPages<V, A, S, Pages, Handler, O, M>

Source§

fn clone(&self) -> TuiPages<V, A, S, Pages, Handler, O, M>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<V: Debug, A: Debug, S: Debug, Pages: Debug, Handler: Debug, O: Debug, M: Debug> Debug for TuiPages<V, A, S, Pages, Handler, O, M>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<V, A, S, Pages, Handler, O, M> Freeze for TuiPages<V, A, S, Pages, Handler, O, M>
where Pages: Freeze, Handler: Freeze, V: Freeze, O: Freeze, M: Freeze,

§

impl<V, A, S, Pages, Handler, O, M> RefUnwindSafe for TuiPages<V, A, S, Pages, Handler, O, M>

§

impl<V, A, S, Pages, Handler, O, M> Send for TuiPages<V, A, S, Pages, Handler, O, M>
where Pages: Send, Handler: Send, V: Send, S: Send, O: Send, M: Send, A: Send,

§

impl<V, A, S, Pages, Handler, O, M> Sync for TuiPages<V, A, S, Pages, Handler, O, M>
where Pages: Sync, Handler: Sync, V: Sync, S: Sync, O: Sync, M: Sync, A: Sync,

§

impl<V, A, S, Pages, Handler, O, M> Unpin for TuiPages<V, A, S, Pages, Handler, O, M>
where Pages: Unpin, Handler: Unpin, V: Unpin, S: Unpin, O: Unpin, M: Unpin, A: Unpin,

§

impl<V, A, S, Pages, Handler, O, M> UnsafeUnpin for TuiPages<V, A, S, Pages, Handler, O, M>
where Pages: UnsafeUnpin, Handler: UnsafeUnpin, V: UnsafeUnpin, O: UnsafeUnpin, M: UnsafeUnpin,

§

impl<V, A, S, Pages, Handler, O, M> UnwindSafe for TuiPages<V, A, S, Pages, Handler, O, M>
where Pages: UnwindSafe, Handler: UnwindSafe, V: UnwindSafe, S: UnwindSafe, O: UnwindSafe, M: UnwindSafe, A: UnwindSafe,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more