pub struct StaticMonarchConfiguration<const N: usize> {
pub name: &'static str,
pub enable_foreign_keys: bool,
pub migrations: [&'static str; N],
}Expand description
Configuration for MonarchDB with compile-time known migrations.
This configuration is used when all migrations are embedded in the binary
at compile time, typically using include_str! or similar macros.
This provides better performance and eliminates runtime file I/O.
Fields§
§name: &'static strThe name of the database schema, used for tracking migration versions.
enable_foreign_keys: boolWhether to enable foreign key constraints in SQLite.
migrations: [&'static str; N]Array of migration SQL strings, ordered from oldest to newest.
Trait Implementations§
Source§impl<const N: usize> Clone for StaticMonarchConfiguration<N>
impl<const N: usize> Clone for StaticMonarchConfiguration<N>
Source§fn clone(&self) -> StaticMonarchConfiguration<N>
fn clone(&self) -> StaticMonarchConfiguration<N>
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<const N: usize> Debug for StaticMonarchConfiguration<N>
impl<const N: usize> Debug for StaticMonarchConfiguration<N>
Source§impl<const N: usize> From<StaticMonarchConfiguration<N>> for MonarchDB
impl<const N: usize> From<StaticMonarchConfiguration<N>> for MonarchDB
Source§fn from(configuration: StaticMonarchConfiguration<N>) -> Self
fn from(configuration: StaticMonarchConfiguration<N>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<const N: usize> Freeze for StaticMonarchConfiguration<N>
impl<const N: usize> RefUnwindSafe for StaticMonarchConfiguration<N>
impl<const N: usize> Send for StaticMonarchConfiguration<N>
impl<const N: usize> Sync for StaticMonarchConfiguration<N>
impl<const N: usize> Unpin for StaticMonarchConfiguration<N>
impl<const N: usize> UnsafeUnpin for StaticMonarchConfiguration<N>
impl<const N: usize> UnwindSafe for StaticMonarchConfiguration<N>
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