pub struct PruneContainersOptionsBuilder { /* private fields */ }Expand description
Builder for the ContainerPrune API query parameter.
Delete stopped containers.
§Examples
use bollard_stubs::query_parameters::PruneContainersOptionsBuilder;
let params = PruneContainersOptionsBuilder::new()
// .filters(/* ... */)
.build();Implementations§
Source§impl PruneContainersOptionsBuilder
impl PruneContainersOptionsBuilder
Sourcepub fn new() -> PruneContainersOptionsBuilder
pub fn new() -> PruneContainersOptionsBuilder
Construct a builder of query parameters for PruneContainersOptions using defaults.
Sourcepub fn filters(
self,
filters: &HashMap<impl Into<String> + Clone, Vec<impl Into<String> + Clone>>,
) -> PruneContainersOptionsBuilder
pub fn filters( self, filters: &HashMap<impl Into<String> + Clone, Vec<impl Into<String> + Clone>>, ) -> PruneContainersOptionsBuilder
Filters to process on the prune list, encoded as JSON (a map[string][]string).
Available filters:
until=<timestamp>Prune containers created before this timestamp. The<timestamp>can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g.10m,1h30m) computed relative to the daemon machine’s time.label(label=<key>,label=<key>=<value>,label!=<key>, orlabel!=<key>=<value>) Prune containers with (or without, in caselabel!=...is used) the specified labels.
Sourcepub fn build(self) -> PruneContainersOptions
pub fn build(self) -> PruneContainersOptions
Consume this builder and use the PruneContainersOptions as parameter to the
ContainerPrune API
Trait Implementations§
Source§impl Clone for PruneContainersOptionsBuilder
impl Clone for PruneContainersOptionsBuilder
Source§fn clone(&self) -> PruneContainersOptionsBuilder
fn clone(&self) -> PruneContainersOptionsBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for PruneContainersOptionsBuilder
impl Default for PruneContainersOptionsBuilder
Source§fn default() -> PruneContainersOptionsBuilder
fn default() -> PruneContainersOptionsBuilder
Returns the “default value” for a type. Read more
Source§impl PartialEq for PruneContainersOptionsBuilder
impl PartialEq for PruneContainersOptionsBuilder
Source§fn eq(&self, other: &PruneContainersOptionsBuilder) -> bool
fn eq(&self, other: &PruneContainersOptionsBuilder) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PruneContainersOptionsBuilder
impl Serialize for PruneContainersOptionsBuilder
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for PruneContainersOptionsBuilder
Auto Trait Implementations§
impl Freeze for PruneContainersOptionsBuilder
impl RefUnwindSafe for PruneContainersOptionsBuilder
impl Send for PruneContainersOptionsBuilder
impl Sync for PruneContainersOptionsBuilder
impl Unpin for PruneContainersOptionsBuilder
impl UnsafeUnpin for PruneContainersOptionsBuilder
impl UnwindSafe for PruneContainersOptionsBuilder
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