pub struct TestAppBuilder { /* private fields */ }Implementations§
Source§impl TestAppBuilder
impl TestAppBuilder
Sourcepub fn migrator<M: MigratorTrait + Send + Sync + 'static>(self) -> Self
pub fn migrator<M: MigratorTrait + Send + Sync + 'static>(self) -> Self
Apply M to a new sqlite file and install Db with an explicit URL
(avoids DATABASE_URL races across parallel tests).
Sourcepub fn env(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn env(self, key: impl Into<String>, value: impl Into<String>) -> Self
Extra env vars (e.g. FORTIFY_SECRET) set before plugin install.
Sourcepub fn configure<F>(self, f: F) -> Self
pub fn configure<F>(self, f: F) -> Self
Mutate the App after plugins (routes, extra middleware) before startup.
Sourcepub async fn build(self) -> (SqliteTestDb, App)
pub async fn build(self) -> (SqliteTestDb, App)
Create sqlite, migrate, install plugins, App::run_startup.
Auto Trait Implementations§
impl !RefUnwindSafe for TestAppBuilder
impl !Sync for TestAppBuilder
impl !UnwindSafe for TestAppBuilder
impl Freeze for TestAppBuilder
impl Send for TestAppBuilder
impl Unpin for TestAppBuilder
impl UnsafeUnpin for TestAppBuilder
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more