pub struct Bus(/* private fields */);Expand description
The page’s one bus (a handle: clones are the same bus).
Implementations§
Source§impl Bus
impl Bus
Sourcepub fn new(rt: &Runtime) -> Self
pub fn new(rt: &Runtime) -> Self
A bus over the signals of rt; the host is set by Self::set_host.
pub fn set_host(&self, host: Weak<dyn BusHost>)
Sourcepub fn join(&self, name: &str, uses: &[String]) -> Member
pub fn join(&self, name: &str, uses: &[String]) -> Member
A member: what the mounted component name, whose uses is
uses, is handed.
Sourcepub fn say(&self, topic: &str, data: Value)
pub fn say(&self, topic: &str, data: Value)
FRAME-50: the host’s own word — data on topic (under plexus.)
to every member listening, in the bus’s turn.
Sourcepub fn say_sticky(&self, topic: &str, data: Value)
pub fn say_sticky(&self, topic: &str, data: Value)
FRAME-53: the host’s word, kept as the topic’s last event — what a
late Member::on_last hears (plexus.booted).
Sourcepub fn last(&self, topic: &str) -> Option<Value>
pub fn last(&self, topic: &str) -> Option<Value>
FRAME-53: topic’s kept event, if it is sticky and was said.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Bus
impl !Send for Bus
impl !Sync for Bus
impl !UnwindSafe for Bus
impl Forget for Bus
impl Freeze for Bus
impl Move for Bus
impl Unpin for Bus
impl UnsafeUnpin for Bus
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Variant for T
impl<T> Variant for T
Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert this
Variant trait object to &mut dyn Any.Source§fn as_boxed_any(self: Box<T>) -> Box<dyn Any>
fn as_boxed_any(self: Box<T>) -> Box<dyn Any>
Convert this
Variant trait object to Box<dyn Any>.