pub struct StoreConfig {
pub name: String,
pub storage: StorageType,
pub max_history: Option<u32>,
pub max_age: Option<Duration>,
pub max_bytes: Option<i64>,
pub num_replicas: Option<usize>,
}Expand description
Configuration for creating a store.
Fields§
§name: StringStore name/bucket identifier.
storage: StorageTypeStorage type (memory or persistent).
max_history: Option<u32>Maximum history/versions to keep (NATS-specific, ignored by other stores).
max_age: Option<Duration>Maximum age for entries in the bucket (bucket-level TTL).
Entries older than this are automatically removed.
NATS: maps to max_age on bucket config.
max_bytes: Option<i64>Maximum bytes for the bucket (required by Synadia Cloud).
NATS: maps to max_bytes on bucket config.
num_replicas: Option<usize>Number of stream replicas for the bucket (NATS cluster mode). Defaults to 1 (single replica). Set to 3 for production HA clusters.
Trait Implementations§
Source§impl Clone for StoreConfig
impl Clone for StoreConfig
Source§fn clone(&self) -> StoreConfig
fn clone(&self) -> StoreConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 StoreConfig
impl Debug for StoreConfig
Source§impl Default for StoreConfig
impl Default for StoreConfig
Source§fn default() -> StoreConfig
fn default() -> StoreConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StoreConfig
impl RefUnwindSafe for StoreConfig
impl Send for StoreConfig
impl Sync for StoreConfig
impl Unpin for StoreConfig
impl UnsafeUnpin for StoreConfig
impl UnwindSafe for StoreConfig
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