pub struct LaneBus { /* private fields */ }Expand description
Read-only typed bus carrying Flow outputs to lanes for one tick.
Lanes access it through LaneContext::bus
and read views via LaneBus::get. The bus itself is constructed by
the scheduler at the start of each frame and dropped at the end — its
lifetime is strictly tick-scoped.
Implementations§
Source§impl LaneBus
impl LaneBus
Sourcepub fn publish<V: Any + Send + Sync>(&mut self, view: V)
pub fn publish<V: Any + Send + Sync>(&mut self, view: V)
Publishes a typed view into the bus. Replaces any existing entry of
the same type. Used by Flow execution; not callable from lane code.
Sourcepub fn get<V: Any + Send + Sync>(&self) -> Option<&V>
pub fn get<V: Any + Send + Sync>(&self) -> Option<&V>
Returns a shared reference to a view by type, or None if no Flow
has published one this tick.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LaneBus
impl !RefUnwindSafe for LaneBus
impl Send for LaneBus
impl Sync for LaneBus
impl Unpin for LaneBus
impl UnsafeUnpin for LaneBus
impl !UnwindSafe for LaneBus
Blanket Implementations§
Source§impl<T> AppLifecycle for Twhere
T: ?Sized,
impl<T> AppLifecycle for Twhere
T: ?Sized,
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