[−][src]Struct testfixtures::Loader
This type accepts and set some options.
Fields
pool: Option<Pool<C>>
helper: Option<Box<dyn DB<D, C, O, Tz>>>
fixture_files: Vec<FixtureFile<Tz>>
skip_test_database_check: bool
location: Option<Tz>
Implementations
impl<D, C, O, Tz> Loader<D, C, O, Tz> where
D: Database + Sync + Send,
C: Connection<Database = D> + Connect<Database = D> + Sync + Send,
O: Offset + Display + Send + Sync,
Tz: TimeZone<Offset = O> + Send + Sync,
[src]
D: Database + Sync + Send,
C: Connection<Database = D> + Connect<Database = D> + Sync + Send,
O: Offset + Display + Send + Sync,
Tz: TimeZone<Offset = O> + Send + Sync,
pub async fn load<'_>(&'_ self) -> Result<()>
[src]
Execute SQL queries builded from yaml files.
pub fn database(&mut self, pool: Pool<C>)
[src]
Set database pool.
pub fn skip_test_database_check(&mut self)
[src]
Turn test database check off.
pub fn location(&mut self, location: Tz)
[src]
Set timezone.
pub fn files(&mut self, files: Vec<&str>)
[src]
Set fixture files directly.
pub fn directory(&mut self, directory: &str)
[src]
Set fixture files from a directory.
pub fn paths(&mut self, paths: Vec<&str>)
[src]
This option is a combination of files option and directory option.
impl<O, Tz> Loader<MySql, MySqlConnection, O, Tz> where
O: Offset + Display + Send + Sync + 'static,
Tz: TimeZone<Offset = O> + Send + Sync + 'static,
[src]
O: Offset + Display + Send + Sync + 'static,
Tz: TimeZone<Offset = O> + Send + Sync + 'static,
pub async fn new<F>(options: F) -> Result<MySqlLoader<O, Tz>> where
F: FnOnce(&mut MySqlLoader<O, Tz>),
[src]
F: FnOnce(&mut MySqlLoader<O, Tz>),
Trait Implementations
impl<D, C, O, Tz> Default for Loader<D, C, O, Tz> where
D: Database + Sync + Send,
C: Connection<Database = D> + Connect<Database = D> + Sync + Send,
O: Offset,
Tz: TimeZone<Offset = O> + Send + Sync,
[src]
D: Database + Sync + Send,
C: Connection<Database = D> + Connect<Database = D> + Sync + Send,
O: Offset,
Tz: TimeZone<Offset = O> + Send + Sync,
Auto Trait Implementations
impl<D, C, O, Tz> !RefUnwindSafe for Loader<D, C, O, Tz>
impl<D, C, O, Tz> !Send for Loader<D, C, O, Tz>
impl<D, C, O, Tz> !Sync for Loader<D, C, O, Tz>
impl<D, C, O, Tz> Unpin for Loader<D, C, O, Tz> where
O: Unpin,
Tz: Unpin,
O: Unpin,
Tz: Unpin,
impl<D, C, O, Tz> !UnwindSafe for Loader<D, C, O, Tz>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,