Skip to main content

EventWriter

Trait EventWriter 

Source
pub trait EventWriter<I = ()>: MaybeSend + MaybeSync {
    // Required method
    fn emit_with_context(
        &self,
        client: Option<ClientEvent>,
        internal: Option<I>,
        context: EventContext,
    );

    // Provided method
    fn emit(&self, client: Option<ClientEvent>, internal: Option<I>) { ... }
}
Expand description

The only interface an emitter needs. A public-only crate uses an adapter.

Required Methods§

Source

fn emit_with_context( &self, client: Option<ClientEvent>, internal: Option<I>, context: EventContext, )

Provided Methods§

Source

fn emit(&self, client: Option<ClientEvent>, internal: Option<I>)

Implementors§

Source§

impl<I> EventWriter for PublicBufferWriter<'_, '_, I>
where I: Clone + MaybeSend + MaybeSync + 'static,

Source§

impl<I> EventWriter for PublicBusWriter<I>
where I: Clone + MaybeSend + MaybeSync + 'static,

Source§

impl<I> EventWriter<I> for EventBuffer<'_, I>
where I: Clone + MaybeSend + MaybeSync + 'static,

Source§

impl<I> EventWriter<I> for EventBus<I>
where I: Clone + MaybeSend + MaybeSync + 'static,