parse_volume_spec

Function parse_volume_spec 

Source
fn parse_volume_spec(spec: &str) -> Option<(&str, &str, bool)>
Expand description

Parse a Docker volume spec into (source, target, read_only).

Format: source:target or source:target:options.

Handles Windows drive-letter bind paths (e.g. C:\Users\me\repo:/workspace:ro) by treating the drive-letter colon (X:) as part of the source path, not as the source/target separator. A plain splitn(3, ':') would split C:\path into C and \path, losing the drive letter.

Returns None for malformed specs (no target separator found).