Struct podman_api::api::Volumes[][src]

pub struct Volumes<'podman> { /* fields omitted */ }
Expand description

Handle for Podman Volumes.

Implementations

Exports an interface for interacting with Podman Volumes.

Returns a reference to a set of operations available to a specific Volume.

Api Reference

Create a volume with specified options.

Examples:

let podman = Podman::unix("/run/user/1000/podman/podman.sock");

match podman
    .volumes()
    .create(
        &VolumeCreateOpts::builder()
            .driver("my-driver")
            .name("my-vol")
            .build(),
    )
    .await
{
    Ok(info) => println!("{:?}", info),
    Err(e) => eprintln!("{}", e),
}

Api Reference

Returns a list of volumes.

Examples:

let podman = Podman::unix("/run/user/1000/podman/podman.sock");

for volume in podman
    .volumes()
    .list(
        &VolumeListOpts::builder()
            .filter([VolumeListFilter::Driver("my-sd")])
            .build(),
    )
    .await
    .unwrap()
{
    println!("{:?}", volume);
}

Api Reference

Delete unused volumes.

Examples:

let podman = Podman::unix("/run/user/1000/podman/podman.sock");

match podman.volumes().prune(&Default::default()).await {
    Ok(info) => println!("{:?}", info),
    Err(e) => eprintln!("{}", e),
}

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more