Skip to main content

Flow

Enum Flow 

Source
pub enum Flow<T> {
    Continue,
    Done(T),
    Cancel,
    Ignored,
    Handoff(Command),
}
Expand description

What a component wants after handling an event.

Variants§

§

Continue

Keep going. The view is rendered again, and repainted only if it changed.

§

Done(T)

Finished with a value.

§

Cancel

The user backed out (Escape, q): no value.

§

Ignored

The event was not for this component: it is left to the container the component is in, which may use it itself (a focus key, a binding of its own) or pass it on to its own container (0.0.14). The event loop, at the top, treats it as Continue.

§

Handoff(Command)

Give the terminal to command ($EDITOR file, a pager) until it exits, then take it back and repaint; the component then gets Event::Returned with the exit code (#489).

Trait Implementations§

Source§

impl<T: Debug> Debug for Flow<T>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> !RefUnwindSafe for Flow<T>

§

impl<T> !UnwindSafe for Flow<T>

§

impl<T> Freeze for Flow<T>
where T: Freeze,

§

impl<T> Send for Flow<T>
where T: Send,

§

impl<T> Sync for Flow<T>
where T: Sync,

§

impl<T> Unpin for Flow<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for Flow<T>
where T: UnsafeUnpin,

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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.