pub struct EventStoreConfig {
pub max_events_per_stream: usize,
pub ttl: Option<Duration>,
}Expand description
Configuration for the event store.
Fields§
§max_events_per_stream: usizeMaximum number of events to retain per stream.
ttl: Option<Duration>Time-to-live for events. None means events never expire.
Implementations§
Source§impl EventStoreConfig
impl EventStoreConfig
Sourcepub fn no_expiry() -> EventStoreConfig
pub fn no_expiry() -> EventStoreConfig
Creates a config with no TTL (events never expire).
Sourcepub fn max_events(self, max: usize) -> EventStoreConfig
pub fn max_events(self, max: usize) -> EventStoreConfig
Sets the maximum events per stream.
Sourcepub fn ttl(self, ttl: Duration) -> EventStoreConfig
pub fn ttl(self, ttl: Duration) -> EventStoreConfig
Sets the TTL for events.
Sourcepub fn no_ttl(self) -> EventStoreConfig
pub fn no_ttl(self) -> EventStoreConfig
Disables TTL (events never expire).
Trait Implementations§
Source§impl Clone for EventStoreConfig
impl Clone for EventStoreConfig
Source§fn clone(&self) -> EventStoreConfig
fn clone(&self) -> EventStoreConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EventStoreConfig
impl Debug for EventStoreConfig
Source§impl Default for EventStoreConfig
impl Default for EventStoreConfig
Source§fn default() -> EventStoreConfig
fn default() -> EventStoreConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EventStoreConfig
impl RefUnwindSafe for EventStoreConfig
impl Send for EventStoreConfig
impl Sync for EventStoreConfig
impl Unpin for EventStoreConfig
impl UnwindSafe for EventStoreConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).