Struct bollard::container::ListContainersOptions[][src]

pub struct ListContainersOptions<T> where
    T: Into<String> + Eq + Hash + Serialize
{ pub all: bool, pub limit: Option<isize>, pub size: bool, pub filters: HashMap<T, Vec<T>>, }

Parameters used in the List Container API

Examples

use bollard::container::ListContainersOptions;

use std::collections::HashMap;
use std::default::Default;

let mut filters = HashMap::new();
filters.insert("health", vec!("unhealthy"));

ListContainersOptions{
    all: true,
    filters: filters,
    ..Default::default()
};
ListContainersOptions::<String>{
    ..Default::default()
};

Fields

all: bool

Return all containers. By default, only running containers are shown

limit: Option<isize>

Return this number of most recently created containers, including non-running ones

size: bool

Return the size of container as fields SizeRw and SizeRootFs

filters: HashMap<T, Vec<T>>

Filters to process on the container list, encoded as JSON. Available filters:

  • ancestor=(<image-name>[:<tag>], <image id>, or <image@digest>)
  • before=(<container id> or <container name>)
  • expose=(<port>[/<proto>]|<startport-endport>/[<proto>])
  • exited=<int> containers with exit code of <int>
  • health=(starting|healthy|unhealthy|none)
  • id=<ID> a container's ID
  • isolation=(default|process|hyperv) (Windows daemon only)
  • is-task=(true|false)
  • label=key or label="key=value" of a container label
  • name=<name> a container's name
  • network=(<network id> or <network name>)
  • publish=(<port>[/<proto>]|<startport-endport>/[<proto>])
  • since=(<container id> or <container name>)
  • status=(created|restarting|running|removing|paused|exited|dead)
  • volume=(<volume name> or <mount point destination>)

Trait Implementations

impl<T: Clone> Clone for ListContainersOptions<T> where
    T: Into<String> + Eq + Hash + Serialize
[src]

impl<T: Debug> Debug for ListContainersOptions<T> where
    T: Into<String> + Eq + Hash + Serialize
[src]

impl<T: Default> Default for ListContainersOptions<T> where
    T: Into<String> + Eq + Hash + Serialize
[src]

impl<T> Serialize for ListContainersOptions<T> where
    T: Into<String> + Eq + Hash + Serialize
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for ListContainersOptions<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for ListContainersOptions<T> where
    T: Send
[src]

impl<T> Sync for ListContainersOptions<T> where
    T: Sync
[src]

impl<T> Unpin for ListContainersOptions<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for ListContainersOptions<T> where
    T: UnwindSafe
[src]

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.