pub struct MySqlContainer { /* private fields */ }Expand description
A single-node MySQL container.
Implementations§
Source§impl MySqlContainer
impl MySqlContainer
Sourcepub fn with_image(image: &str) -> Self
pub fn with_image(image: &str) -> Self
Builds a container from a caller-chosen image.
Sourcepub fn with_username(self, username: &str) -> Self
pub fn with_username(self, username: &str) -> Self
Overrides MYSQL_USER (default test).
Sourcepub fn with_password(self, password: &str) -> Self
pub fn with_password(self, password: &str) -> Self
Overrides MYSQL_PASSWORD (default test).
Sourcepub fn with_database(self, database: &str) -> Self
pub fn with_database(self, database: &str) -> Self
Overrides MYSQL_DATABASE (default test).
Sourcepub async fn start(self) -> Result<MySqlGuard>
pub async fn start(self) -> Result<MySqlGuard>
Boots the container.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for MySqlContainer
impl !UnwindSafe for MySqlContainer
impl Freeze for MySqlContainer
impl Send for MySqlContainer
impl Sync for MySqlContainer
impl Unpin for MySqlContainer
impl UnsafeUnpin for MySqlContainer
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