Skip to main content

Crate ratatui_elm

Crate ratatui_elm 

Source
Expand description

A simple Elm architecture framework for ratatui.

The architecture is heavily inspired by iced. It provides an ergonomic interface for executing long-running tasks in the background and handling events concurrently, while only re-rendering when strictly necessary.

See the hello world example for a basic usage example.

This framework provides a built-in subscription to terminal events. Do not manually subscribe to events, as this will cause the two subscriptions to fight over each event.

§Features

This crate works with all four officially supported ratatui backends:

There is a cargo feature for each backend implementation. These feature flags are not mutually exclusive, though if you have only one enabled that backend will be used without manual specification.

Similarly, this crate can be used with any async runtime that is integrated with byor. Three runtimes are provided:

There are also features for each runtime that behave the same as the backend features.

Modules§

backend
runtime
Provided runtime implementations.

Structs§

App
A ratatui application.
AppWithBackend
Lets you construct an App with a custom backend in a more convenient way.

Enums§

Task
A task to be executed by the runtime.
Update

Traits§

Updater
A trait for a struct that can update the state of the application.
Viewer
A trait for a struct that can render the state of the application.

Type Aliases§

DefaultBackend
DefaultEvent
DefaultRuntime