Struct podman_api::api::Pod[][src]

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

Interface for accessing and manipulating Podman Pod.

Api Reference

Implementations

Exports an interface exposing operations against a Pod instance.

A getter for Pod id

Api Reference

Start this pod.

Parameters:

  • detach_keys - Override the key sequence for detaching a pod. Format is a single character [a-Z] or ctrl- where is one of: a-z, @, ^, [, , or _.

Examples:

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

if let Err(e) = podman.pods().get("79c93f220e3e").start().await {
    eprintln!("{}", e);
}

Api Reference

Stop this pod.

Examples:

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

if let Err(e) = podman.pods().get("79c93f220e3e").stop().await {
    eprintln!("{}", e);
}

Api Reference

Stop this pod with a timeout.

Examples:

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

if let Err(e) = podman.pods().get("79c93f220e3e").stop_with_timeout(10).await {
    eprintln!("{}", e);
}

Api Reference

Return low-level information about this pod.

Examples:

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

match podman.pods().get("79c93f220e3e").inspect().await {
    Ok(info) => println!("{:?}", info),
    Err(e) => eprintln!("{}", e);
}

Api Reference

Send a signal to this pod.

Examples:

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

if let Err(e) = podman.pods().get("79c93f220e3e").send_signal("SIGINT").await {
    eprintln!("{}", e);
}

Api Reference

Kill this pod.

Examples:

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

if let Err(e) = podman.pods().get("79c93f220e3e").kill().await {
    eprintln!("{}", e);
}

Api Reference

Pause this pod.

Examples:

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

if let Err(e) = podman.pods().get("79c93f220e3e").pause().await {
    eprintln!("{}", e);
}

Api Reference

Unpause this pod

Examples:

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

if let Err(e) = podman.pods().get("79c93f220e3e").unpause().await {
    eprintln!("{}", e);
}

Api Reference

Restart this pod.

Examples:

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

if let Err(e) = podman.pods().get("79c93f220e3e").restart().await {
    eprintln!("{}", e);
}

Api Reference

Delete this pod.

Examples:

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

if let Err(e) = podman.pods().get("79c93f220e3e").delete().await {
    eprintln!("{}", e);
}

Api Reference

Force remove this pod.

Examples:

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

if let Err(e) = podman.pods().get("79c93f220e3e").remove().await {
    eprintln!("{}", e);
}

Api Reference

Quick way to determine if a pod exists by name or ID.

Examples:

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

match podman.pods().get("79c93f220e3e").exists().await {
    Ok(exists) => if exists {
        println!("pod exists!");
    } else {
        println!("pod doesn't exists!");
    },
    Err(e) => eprintln!("check failed: {}", e);
}

Api Reference

List processes inside this pod.

Examples:

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

match podman.pods().get("79c93f220e3e").top(&Default::default()).await {
    Ok(info) => println!("{:?}", info),
    Err(e) => eprintln!("{}", e);
}

Api Reference

List processes inside this pod.

Only supported as of version > 4.0

Examples:

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

let stream = podman.pods().get("79c93f220e3e").top_stream(&Default::default())
while let Some(chunk) = stream.next().await {
    match chunk{
        Ok(chunk) => println!("{:?}", chunk),
        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