Skip to main content

Crate use_docker_label

Crate use_docker_label 

Source
Expand description

§use-docker-label

Primitive Docker and OCI label helpers for RustUse.

This crate validates label keys and values and exposes helpers for common OCI annotation labels.

§Basic Usage

use use_docker_label::{DockerLabel, DockerLabelKey, OCI_TITLE};

let label = DockerLabel::new(DockerLabelKey::new(OCI_TITLE)?, "RustUse app")?;

assert_eq!(label.to_string(), "org.opencontainers.image.title=RustUse app");

Structs§

DockerLabel
A Docker label key/value pair.
DockerLabelKey
A validated Docker label key.

Enums§

DockerLabelError
Error returned when Docker label text is invalid.

Constants§

OCI_DESCRIPTION
Common OCI annotation label for a description.
OCI_LICENSES
Common OCI annotation label for license metadata.
OCI_REVISION
Common OCI annotation label for a revision.
OCI_SOURCE
Common OCI annotation label for a source URL.
OCI_TITLE
Common OCI annotation label for an image title.
OCI_VERSION
Common OCI annotation label for a version.