Struct podman_api::api::Volumes [−][src]
pub struct Volumes<'podman> { /* fields omitted */ }
Expand description
Handle for Podman Volumes.
Implementations
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),
}
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);
}
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
Auto Trait Implementations
impl<'podman> !RefUnwindSafe for Volumes<'podman>
impl<'podman> !UnwindSafe for Volumes<'podman>
Blanket Implementations
Mutably borrows from an owned value. Read more
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