pub struct EventStream { /* private fields */ }Implementations§
Source§impl EventStream
impl EventStream
pub fn new(executor: Arc<Executor>) -> Self
pub fn set_executor(&mut self, executor: Arc<Executor>)
pub fn attatch<H: EventHandler>( &self, handler: H, ) -> RadiateResult<Subscriber<H>>
pub fn subscribe<E: Event>(&self, handler: impl Handler<E>) -> Subscription
pub fn publish<E: Event>(&self, event: E)
pub fn lazy_publish<E: Event>(&self, f: impl FnOnce() -> E) -> RadiateResult<()>
pub fn unsubscribe(&self, id: SubscriptionId)
Trait Implementations§
Source§impl Clone for EventStream
impl Clone for EventStream
Source§fn clone(&self) -> EventStream
fn clone(&self) -> EventStream
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EventStream
impl Debug for EventStream
Source§impl Default for EventStream
impl Default for EventStream
Source§fn default() -> EventStream
fn default() -> EventStream
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EventStream
impl RefUnwindSafe for EventStream
impl Send for EventStream
impl Sync for EventStream
impl Unpin for EventStream
impl UnsafeUnpin for EventStream
impl UnwindSafe for EventStream
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