pub struct MongoDbContainer(/* private fields */);Expand description
A single-node MongoDB container, started as a one-member replica set named
docker-rs.
Implementations§
Source§impl MongoDbContainer
impl MongoDbContainer
Sourcepub fn with_image(image: &str) -> Self
pub fn with_image(image: &str) -> Self
Builds a container from a caller-chosen image.
Sourcepub async fn start(self) -> Result<MongoDbGuard>
pub async fn start(self) -> Result<MongoDbGuard>
Boots the container. Does not return until the replica set has a primary.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for MongoDbContainer
impl !UnwindSafe for MongoDbContainer
impl Freeze for MongoDbContainer
impl Send for MongoDbContainer
impl Sync for MongoDbContainer
impl Unpin for MongoDbContainer
impl UnsafeUnpin for MongoDbContainer
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