pub struct EArc { /* private fields */ }Expand description
Reference-counting object based on Arc<RwLock<...>> with methods for broadcasting events
Implementations§
Source§impl EArc
impl EArc
pub fn new() -> Self
pub fn post_event<EVT: Send + Sync + 'static, EVTSRC: Into<Option<Arc<EventBox>>>>( &self, event: EVT, source: EVTSRC, )
pub async fn send_event<EVT: Send + Sync + 'static, EVTSRC: Into<Option<Arc<EventBox>>>>( &self, event: EVT, source: EVTSRC, )
pub fn downgrade(&self) -> WEArc
pub fn create_event_stream<EVT: Send + Sync + 'static>( &self, ) -> EventStream<EVT>
pub fn id(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EArc
impl RefUnwindSafe for EArc
impl Send for EArc
impl Sync for EArc
impl Unpin for EArc
impl UnwindSafe for EArc
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