Struct sqlx_db_tester::TestPg
source · pub struct TestPg {
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 TestPg
impl TestPg
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) -> PgPool
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TestPg
impl Send for TestPg
impl Sync for TestPg
impl Unpin for TestPg
impl UnwindSafe for TestPg
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