pub struct EventChannel<T: 'static> { /* private fields */ }Expand description
The producing half of an EventStream.
A service that receives events from outside the composition — a platform callback, a worker thread, a socket — publishes through a channel, and every pending collector is woken. This is the shape that replaces “register an observer, then drain a queue” everywhere in the framework.
Implementations§
Source§impl<T: 'static> EventChannel<T>
impl<T: 'static> EventChannel<T>
Sourcepub fn stream(&self) -> EventStream<T>
pub fn stream(&self) -> EventStream<T>
The consuming half, handed to collectors.
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for EventChannel<T>
impl<T> !Send for EventChannel<T>
impl<T> !Sync for EventChannel<T>
impl<T> !UnwindSafe for EventChannel<T>
impl<T> Freeze for EventChannel<T>
impl<T> Unpin for EventChannel<T>
impl<T> UnsafeUnpin for EventChannel<T>where
Rc<ChannelShared<T>>: UnsafeUnpin,
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