mongodb_migrator/migrator/
with_shell_config.rs1use super::{
4 shell::ShellConfig, with_connection::WithConnection, with_migrations_vec::WithMigrationsVec,
5};
6use crate::migration::Migration;
7
8#[derive(Clone)]
9pub struct WithShellConfig {
10 pub with_shell_config: ShellConfig,
11 pub with_connection: WithConnection,
12}
13
14impl WithShellConfig {
15 pub fn with_migrations_vec(self, migrations: Vec<Box<dyn Migration>>) -> WithMigrationsVec {
16 WithMigrationsVec {
17 migrations,
18 with_shell_config: Some(self.clone()),
20 with_connection: self.with_connection,
21 }
22 }
23}