返回 CodeWhale
mod.rs
根目录 / crates / tui / src / tui / motion / mod.rs
1 //! Central motion contract for the underwater TUI.
2 //!
3 //! All decorative motion, status spinners, and streaming display cadence
4 //! should ask this module what is allowed. Ad-hoc shimmer/spinner timing
5 //! outside [`MotionMode`] / [`FrameRequester`] is a regression.
6 //!
7 //! # Semantics (not merely fewer frames)
8 //!
9 //! | Mode | Decorative ambient | Status spinner | Streaming text |
10 //! |------|--------------------|----------------|----------------|
11 //! | [`MotionMode::Full`] | yes | animated | steady 30–60 FPS display clock |
12 //! | [`MotionMode::Reduced`] | no | static calm glyph | same display clock; no catch-up bursts; **not** a slow typewriter |
13 //! | [`MotionMode::Still`] | no | static | state-change redraws only; stream still coalesces on the display clock |
14 //!
15 //! Provider SSE deltas are **input**, never animation timing. The display
16 //! clock ([`crate::tui::streaming::StreamDisplayClock`]) coalesces them.
17
18 pub mod frame_requester;
19 pub mod mode;
20
21 pub use frame_requester::FrameRequester;
22 #[allow(unused_imports)] // public API surface for host pickers / widgets
23 pub use mode::{MotionMode, MotionPolicy, SpinnerPresentation};
24
24 lines RUST