pub struct StorageConfig {
pub policy_store: DriverName,
pub audit_sink: DriverName,
pub session_store: DriverName,
pub credential_store: DriverName,
pub rate_limit_counter: DriverName,
pub lifecycle_store: DriverName,
pub drivers: HashMap<DriverName, Value>,
}Expand description
The [storage] section: which driver backs each storage kind, plus the
per-driver connection subsections.
[storage]
policy_store = "redis"
audit_sink = "postgres"
session_store = "redis"
credential_store = "postgres"
rate_limit_counter = "redis"
lifecycle_store = "postgres"
[storage.redis]
url = "redis://localhost:6379"
[storage.postgres]
url = "postgresql://localhost:5432/assembly"The six driver-kind keys select a backend by DriverName; every other key
under [storage] is a [storage.<name>] table captured into drivers
and handed verbatim to that driver’s factory.
Fields§
§policy_store: DriverNameDriver backing the PolicyStore.
audit_sink: DriverNameDriver backing the AuditSink.
session_store: DriverNameDriver backing the SessionStore.
credential_store: DriverNameDriver backing the CredentialStore.
rate_limit_counter: DriverNameDriver backing the RateLimitCounter.
lifecycle_store: DriverNameDriver backing the LifecycleStore.
drivers: HashMap<DriverName, Value>Per-driver [storage.<name>] subsections, keyed by driver name.
Each value is the raw TOML table for that driver; the driver’s own factory parses the keys it needs.
Implementations§
Source§impl StorageConfig
impl StorageConfig
Sourcepub fn driver_section(&self, name: &DriverName) -> Option<&Value>
pub fn driver_section(&self, name: &DriverName) -> Option<&Value>
Return the [storage.<name>] subsection for name, if present.
Trait Implementations§
Source§impl Clone for StorageConfig
impl Clone for StorageConfig
Source§fn clone(&self) -> StorageConfig
fn clone(&self) -> StorageConfig
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 StorageConfig
impl Debug for StorageConfig
Source§impl<'de> Deserialize<'de> for StorageConfig
impl<'de> Deserialize<'de> for StorageConfig
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
Auto Trait Implementations§
impl Freeze for StorageConfig
impl RefUnwindSafe for StorageConfig
impl Send for StorageConfig
impl Sync for StorageConfig
impl Unpin for StorageConfig
impl UnsafeUnpin for StorageConfig
impl UnwindSafe for StorageConfig
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