Skip to main content

StorageConfig

Struct StorageConfig 

Source
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: DriverName

Driver backing the PolicyStore.

§audit_sink: DriverName

Driver backing the AuditSink.

§session_store: DriverName

Driver backing the SessionStore.

§credential_store: DriverName

Driver backing the CredentialStore.

§rate_limit_counter: DriverName

Driver backing the RateLimitCounter.

§lifecycle_store: DriverName

Driver 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

Source

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

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl Debug for StorageConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for StorageConfig

Source§

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 Serialize for StorageConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.