pub struct NativeEventHandle<C: EventCapability> { /* private fields */ }Expand description
Typed, immutable Event endpoints materialized before App boot completes.
Implementations§
Source§impl<C: EventCapability> NativeEventHandle<C>
impl<C: EventCapability> NativeEventHandle<C>
Sourcepub fn binding_count(&self) -> usize
pub fn binding_count(&self) -> usize
Returns the number of explicitly bound subscriber endpoints.
Sourcepub async fn publish(
&self,
operation: &str,
event: C::Event,
) -> Vec<EventPublishResult>
pub async fn publish( &self, operation: &str, event: C::Event, ) -> Vec<EventPublishResult>
Publishes to every bound subscriber in deterministic order.
An empty binding set succeeds with an empty result. Each result is independent: one exhausted or unavailable subscriber does not prevent the remaining bindings from being attempted.
Sourcepub async fn publish_with_context(
&self,
operation: &str,
context: InvocationContext,
event: C::Event,
) -> Vec<EventPublishResult>
pub async fn publish_with_context( &self, operation: &str, context: InvocationContext, event: C::Event, ) -> Vec<EventPublishResult>
Publishes with one propagated Invocation Context.
Trait Implementations§
Auto Trait Implementations§
impl<C> !RefUnwindSafe for NativeEventHandle<C>
impl<C> !Send for NativeEventHandle<C>
impl<C> !Sync for NativeEventHandle<C>
impl<C> !UnwindSafe for NativeEventHandle<C>
impl<C> Freeze for NativeEventHandle<C>
impl<C> Unpin for NativeEventHandle<C>
impl<C> UnsafeUnpin for NativeEventHandle<C>
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