pub struct UiFlow;Expand description
UI presentation Flow.
Deliberately uncached (no cache_key override): the projection
depends on the surface size (runtime state) and on font assets that can
hot-reload without any change signal the key could fold in, so a cached
UiScene could go stale. It re-projects every tick.
Trait Implementations§
Source§impl Flow for UiFlow
impl Flow for UiFlow
Source§const DOMAIN: SemanticDomain = SemanticDomain::Ui
const DOMAIN: SemanticDomain = SemanticDomain::Ui
Domain identifier — matches the agent’s domain.
Source§type View = UiScene
type View = UiScene
The typed view this Flow publishes into the LaneBus.
Clone so the
registration trampoline can republish a cached view without
re-running select/project (views hold Arcs and plain data, so
cloning is cheap relative to a full re-projection).Source§fn project(
&self,
world: &World,
_sel: &Selection,
runtime: &Runtime,
) -> Self::View
fn project( &self, world: &World, _sel: &Selection, runtime: &Runtime, ) -> Self::View
Stage 2 — read-only projection of the world into a View.
Source§fn select(&mut self, world: &World, runtime: &Runtime) -> Selection
fn select(&mut self, world: &World, runtime: &Runtime) -> Selection
Stage 1 — read-only selection of relevant entities.
Source§fn cache_key(&self, world: &World, runtime: &Runtime) -> Option<u64>
fn cache_key(&self, world: &World, runtime: &Runtime) -> Option<u64>
Cache key for view reuse. When
Some(k) matches the key of the
previously published view, the registration trampoline republishes
the cached view without re-running select/project. None (default)
disables caching — correct for flows whose projection depends on
inputs without a change signal. Read moreAuto Trait Implementations§
impl Freeze for UiFlow
impl RefUnwindSafe for UiFlow
impl Send for UiFlow
impl Sync for UiFlow
impl Unpin for UiFlow
impl UnsafeUnpin for UiFlow
impl UnwindSafe for UiFlow
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more