Skip to main content

Crate use_docker_env

Crate use_docker_env 

Source
Expand description

§use-docker-env

Primitive Docker environment file helpers for RustUse.

This crate parses KEY=value lines, blank lines, and comments. It preserves values as text and does not perform shell expansion or interpolation.

§Basic Usage

use use_docker_env::{EnvLine, EnvLineKind};

let line = EnvLine::parse("RUST_LOG=info")?;

assert_eq!(line.kind(), EnvLineKind::Variable);
assert_eq!(line.key(), Some("RUST_LOG"));
assert_eq!(line.value(), Some("info"));

Structs§

EnvLine
A classified Docker env-file line.
EnvVar
A validated environment variable key and value.

Enums§

EnvLineKind
Environment file line classification.
EnvParseError
Error returned when Docker environment text is invalid.