[][src]Struct dockers::containers::Container

pub struct Container {
    pub Id: String,
    pub Names: Vec<String>,
    pub Image: String,
    pub ImageID: String,
    pub Command: String,
    pub State: String,
    pub Status: String,
    pub Ports: Vec<Port>,
    pub Labels: Option<HashMap<String, Value>>,
    pub SizeRw: Option<i64>,
    pub SizeRootFs: u64,
    pub HostConfig: HostConfig,
    pub Mounts: Vec<Mounts>,
}

Container

Container struct that implement several methods for handling containers.

You have multiple ways to create a container.

extern crate dockers;


use dockers::Container;

// From the struct
let cont = Container {
    Image: "debian".to_owned(),
    ..Default::default()
}
    .create(Some("my_container_name".to_owned()), None)
    .expect("Cannot create container for debian");

// You could clone a container!
// TODO

cont.remove().unwrap();

Fields

Id: StringNames: Vec<String>Image: StringImageID: StringCommand: StringState: StringStatus: StringPorts: Vec<Port>Labels: Option<HashMap<String, Value>>SizeRw: Option<i64>SizeRootFs: u64HostConfig: HostConfigMounts: Vec<Mounts>

Methods

impl Container[src]

Trait Implementations

impl Client for Container[src]

fn get_response_from_api(
    &self,
    api_endpoint: &str,
    method: Method,
    query_params: Option<&str>,
    body: Option<&str>
) -> Result<Response, DockerApiError>
[src]

impl Default for Container[src]

impl Debug for Container[src]

impl Serialize for Container[src]

impl<'de> Deserialize<'de> for Container where
    Container: Default
[src]

Auto Trait Implementations

impl Send for Container

impl Sync for Container

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]