termint 0.9.0

Library for colored printing and Terminal User Interfaces
Documentation
use bitflags::bitflags;

bitflags! {
    /// Used by [`crate::term::Application`] to signal required action to the
    /// [`crate::term::Term`]. This, for example, allows rendering only when
    /// needed or a clean way to quit the [`crate::term::Term`] main loop in
    /// the [`crate::term::Term::run`].
    #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
    pub struct Action: u8 {
        /// Do nothing
        const NONE = 0b0000;
        /// Re-render the previous widget tree. Used when only widget's state
        /// changed, such as selected list item.
        const RERENDER = 0b0001;
        /// Rebuild the widget tree by calling `view()` and renders it.
        const RENDER = 0b0010;
        /// Quits the main loop
        const QUIT = 0b0100;
        /// Dumps the entire layout cache and forces a full recalculation.
        ///
        /// Use it only if changing layout doesn't take effect - which hopefuly
        /// shouldn't happen (often).
        const RELAYOUT = 0b1000;
    }
}