pub struct Config {
pub migration: MigrationConfig,
}Expand description
Configuration for Toasty CLI operations.
Holds all settings that control how the CLI behaves. Currently this is
limited to MigrationConfig. A Config can be built programmatically
with the builder methods or loaded from a Toasty.toml file via
Config::load.
§Examples
use toasty_cli::{Config, MigrationConfig, MigrationPrefixStyle};
let config = Config::new()
.migration(
MigrationConfig::new()
.path("db")
.prefix_style(MigrationPrefixStyle::Timestamp),
);
assert_eq!(
config.migration.get_migrations_dir(),
std::path::PathBuf::from("db/migrations"),
);Fields§
§migration: MigrationConfigMigration-related configuration
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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 Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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