Struct docker_sdk::container::Containers
source · pub struct Containers<'docker> { /* private fields */ }
Expand description
Interface for docker containers
Implementations
sourceimpl<'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>where
S: Into<String>,
pub fn get<S>(&self, name: S) -> Container<'docker>where
S: Into<String>,
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> !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
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