pub struct EventLog<E> { /* private fields */ }Expand description
In-memory append-only event log with interior mutability.
Implementations§
Trait Implementations§
Source§impl<'de, E: Deserialize<'de>> Deserialize<'de> for EventLog<E>
impl<'de, E: Deserialize<'de>> Deserialize<'de> for EventLog<E>
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<E: Clone> Merge for EventLog<E>
impl<E: Clone> Merge for EventLog<E>
Source§fn merge(&mut self, other: Self)
fn merge(&mut self, other: Self)
Merges another EventLog into this one, deduplicating by UUID and ordering by (timestamp, uuid).
§Deadlock Prevention
- If
selfandotherare the same Arc, merging is a no-op (prevents self-deadlock). - Otherwise, always lock the two logs in a consistent order (by pointer address) to prevent lock order inversion deadlocks.
Auto Trait Implementations§
impl<E> Freeze for EventLog<E>
impl<E> RefUnwindSafe for EventLog<E>
impl<E> Send for EventLog<E>where
E: Send,
impl<E> Sync for EventLog<E>where
E: Send,
impl<E> Unpin for EventLog<E>
impl<E> UnwindSafe for EventLog<E>
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