pub struct Manifest<'podman> { /* private fields */ }
Expand description

Interface for accessing and manipulating Podman Manifest.

Api Reference

Implementations

Exports an interface exposing operations against a Manifest instance.

A getter for Manifest name

Api Reference

Quick way to determine if a manifest exists by name or id.

Examples:

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

    match podman.manifests().get("some-manifest").exists().await {
        Ok(exists) => if exists {
            println!("manifest exists!");
        } else {
            println!("manifest doesn't exists!");
        },
        Err(e) => eprintln!("check failed: {}", e),
    }
};

Api Reference

Display details about this manifest list.

Examples:

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

    match podman.manifests().get("my-manifest").inspect().await {
        Ok(info) => println!("{:?}", info),
        Err(e) => eprintln!("{}", e),
    }
};

Api Reference

Add an image to this manifest list.

Examples:

async {
    use podman_api::Podman;
    use podman_api::opts::ManifestImageAddOpts;
    let podman = Podman::unix("/run/user/1000/podman/podman.sock");

    let manifest = podman.manifests().get("my-manifest");
    match manifest
        .add_image(&ManifestImageAddOpts::builder().images(["centos"]).build())
        .await
    {
        Ok(id) => println!("{:?}", id),
        Err(e) => eprintln!("{}", e),
    }
};

Api Reference

Remove an image digest from this manifest list.

Examples:

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

    match podman
      .manifests()
      .get("my-manifest")
      .remove_image("sha256:a1801b843b1bfaf77c501e7a6d3f709401a1e0c83863037fa3aab063a7fdb9dc")
      .await {
        Ok(id) => println!("{:?}", id),
        Err(e) => eprintln!("{}", e),
    }
};

Api Reference

Push this manifest list to a registry.

Examples:

async {
    use podman_api::Podman;
    use podman_api::opts::ManifestPushOpts;
    let podman = Podman::unix("/run/user/1000/podman/podman.sock");

    let manifest = podman.manifests().get("my-manifest");
    match manifest
        .push(&ManifestPushOpts::builder("some-registry.addr").all(true).build())
        .await
    {
        Ok(id) => println!("{:?}", id),
        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

Returns the argument unchanged.

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

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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