pub struct Containers<'docker> { /* private fields */ }
Expand description
Interface for docker containers
Implementations§
Source§impl<'docker> Containers<'docker>
impl<'docker> Containers<'docker>
Sourcepub fn new(docker: &'docker Docker) -> Self
pub fn new(docker: &'docker Docker) -> Self
Exports an interface for interacting with docker containers
Sourcepub async fn list(
&self,
opts: &ContainerListOptions,
) -> Result<Vec<ContainerInfo>>
pub async fn list( &self, opts: &ContainerListOptions, ) -> Result<Vec<ContainerInfo>>
Lists the container instances on the docker host
Sourcepub fn get<S>(&self, name: S) -> Container<'docker>
pub fn get<S>(&self, name: S) -> Container<'docker>
Returns a reference to a set of operations available to a specific container instance
Sourcepub async fn create(
&self,
opts: &ContainerOptions,
) -> Result<ContainerCreateInfo>
pub async fn create( &self, opts: &ContainerOptions, ) -> Result<ContainerCreateInfo>
Returns a builder interface for creating a new container instance
Auto Trait Implementations§
impl<'docker> Freeze for Containers<'docker>
impl<'docker> !RefUnwindSafe for Containers<'docker>
impl<'docker> Send for Containers<'docker>
impl<'docker> Sync for Containers<'docker>
impl<'docker> Unpin for Containers<'docker>
impl<'docker> !UnwindSafe for Containers<'docker>
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