Opinionated, component-based TUI framework for Rust - declarative components, reconciliation, layout engine, focus, overlays, and rich widgets on top of ratatui.
usestd::cell::RefCell;usestd::rc::Rc;usesuper::UiSnapshot;/// Slot that receives a UI snapshot after the next render in a live app.
#[derive(Clone, Default)]pubstructUiSnapshotSlot{inner:Rc<RefCell<Option<UiSnapshot>>>,
}implUiSnapshotSlot{/// Create an empty snapshot slot.
pubfnnew()->Self{Self::default()}/// Returns `true` when a snapshot has been delivered and not yet taken.
pubfnis_ready(&self)->bool{self.inner.borrow().is_some()}/// Returns and clears the delivered snapshot, if any.
pubfntake(&self)->Option<UiSnapshot>{self.inner.borrow_mut().take()}pub(crate)fnshared(&self)->Rc<RefCell<Option<UiSnapshot>>>{Rc::clone(&self.inner)}}