pub struct LocalEmitterPublisher { /* private fields */ }Expand description
A publisher that emits events via an EventEmitter for in-process subscribers.
Requires the emitter feature to be enabled.
Implementations§
Source§impl LocalEmitterPublisher
impl LocalEmitterPublisher
pub fn new(emitter: EventEmitter) -> Self
Trait Implementations§
Source§impl OutboxPublisher for LocalEmitterPublisher
Available on crate feature emitter only.
impl OutboxPublisher for LocalEmitterPublisher
Available on crate feature
emitter only.type Error = Infallible
Source§fn publish(
&mut self,
event_type: &str,
payload: &[u8],
_metadata: &HashMap<String, String>,
) -> Result<(), Self::Error>
fn publish( &mut self, event_type: &str, payload: &[u8], _metadata: &HashMap<String, String>, ) -> Result<(), Self::Error>
Publish an event with the given type, payload bytes, and metadata.
The publisher is responsible for converting the payload to the appropriate format
(e.g., decoding bitcode and re-encoding to JSON for CloudEvents).
Auto Trait Implementations§
impl !RefUnwindSafe for LocalEmitterPublisher
impl !UnwindSafe for LocalEmitterPublisher
impl Freeze for LocalEmitterPublisher
impl Send for LocalEmitterPublisher
impl Sync for LocalEmitterPublisher
impl Unpin for LocalEmitterPublisher
impl UnsafeUnpin for LocalEmitterPublisher
Blanket Implementations§
Source§impl<T> AggregateBuilder for T
impl<T> AggregateBuilder for T
fn aggregate<A: Aggregate>(self) -> AggregateRepository<Self, A>
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
Source§impl<T> Queueable for T
impl<T> Queueable for T
Source§fn queued(self) -> QueuedRepository<Self, InMemoryAsyncLockManager>
fn queued(self) -> QueuedRepository<Self, InMemoryAsyncLockManager>
Wrap with the default async lock manager. Pair with
.aggregate::<T>() for per-aggregate serialization over the async
repository surface.Source§fn queued_with<L: AsyncLockManager>(
self,
lock_manager: L,
) -> QueuedRepository<Self, L>
fn queued_with<L: AsyncLockManager>( self, lock_manager: L, ) -> QueuedRepository<Self, L>
Wrap with a custom async lock manager.