Struct sqlx_db_tester::TestDb
source · pub struct TestDb {
pub host: String,
pub port: u16,
pub user: String,
pub password: String,
pub dbname: String,
}
Fields
host: String
port: u16
user: String
password: String
dbname: String
Implementations
sourceimpl TestDb
impl TestDb
pub fn new<S>(
host: impl Into<String>,
port: u16,
user: impl Into<String>,
password: impl Into<String>,
migrations: S
) -> Selfwhere
S: MigrationSource<'static> + Send + Sync + 'static,
pub fn server_url(&self) -> String
pub fn url(&self) -> String
pub async fn get_pool(&self) -> AnyPool
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TestDb
impl Send for TestDb
impl Sync for TestDb
impl Unpin for TestDb
impl UnwindSafe for TestDb
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more