mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-07-17 15:56:57 +02:00
more space/ and draw/ modules
- 26 errors and 16 doctest fails - getting there, perpetually
This commit is contained in:
parent
42a1807c2b
commit
145047b7ff
15 changed files with 269 additions and 232 deletions
|
|
@ -645,9 +645,9 @@ pub const fn border <T, S: BorderStyle> (on: bool, style: S, draw: impl Draw<Tui
|
|||
/// Draw TUI content or its error message.
|
||||
///
|
||||
/// ```
|
||||
/// let _ = tengri::tui::catcher(Ok(Some("hello")));
|
||||
/// let _ = tengri::tui::catcher(Ok(None));
|
||||
/// let _ = tengri::tui::catcher(Err("draw fail".into()));
|
||||
/// let _ = tengri::term::catcher(Ok(Some("hello")));
|
||||
/// let _ = tengri::term::catcher(Ok(None));
|
||||
/// let _ = tengri::term::catcher(Err("draw fail".into()));
|
||||
/// ```
|
||||
pub fn catcher <T: Draw<Tui>> (result: Usually<T>) -> impl Draw<Tui> {
|
||||
thunk(move|to: &mut Tui|match result {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue