pub struct TestPg {
pub server_url: String,
pub dbname: String,
}Fields§
§server_url: String§dbname: StringImplementations§
Source§impl TestPg
impl TestPg
pub fn new<S>(server_url: String, migrations: S) -> Self
pub fn server_url(&self) -> String
pub fn url(&self) -> String
pub async fn get_pool(&self) -> PgPool
pub async fn load_csv( &self, table: &str, fields: &[&str], filename: &Path, ) -> Result<()>
pub async fn load_csv_data(&self, table: &str, csv: &str) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TestPg
impl RefUnwindSafe for TestPg
impl Send for TestPg
impl Sync for TestPg
impl Unpin for TestPg
impl UnwindSafe for TestPg
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> 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