Trait logid::evident::event::intermediary::IntermediaryEvent
pub trait IntermediaryEvent<K, M, T>: Sizedwhere
K: Id,
M: Msg,
T: EventEntry<K, M>,{
// Required methods
fn new(event_id: K, msg: Option<impl Into<M>>, origin: Origin) -> Self;
fn get_entry(&self) -> &T;
fn take_entry(&mut self) -> T;
// Provided methods
fn get_event_id(&self) -> &K { ... }
fn finalize(self) -> FinalizedEvent<K> { ... }
fn into_event_id(self) -> K { ... }
}
Required Methods§
fn new(event_id: K, msg: Option<impl Into<M>>, origin: Origin) -> Self
fn get_entry(&self) -> &T
fn take_entry(&mut self) -> T
Provided Methods§
fn get_event_id(&self) -> &K
fn get_event_id(&self) -> &K
Returns the Id
of this event
fn finalize(self) -> FinalizedEvent<K>
fn finalize(self) -> FinalizedEvent<K>
Finalizing the event sends it to the publisher, and returns the FinalizedEvent
.
This struct includes the Id
used to set the event, and the id of the specific EventEntry
associated with this event.
Note: Finalizing prevents any further information to be added to the event.