serde-cmd 0.1.0

A small library to deserialize commands
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
A simple library to parse a command with arguments.

On a string that represents a command, such as one that is supposed to be passed
to a shell, one can't simply use `split_whitespace`, since some argumenst may be
quoted and contain multiple words.
This crate provides an analogous parser, which keeps quoted items together.

# Serde
Additionlay, when the `serde` feature is enabled (which is the case by default),
this crate provides a type `Cmd` which implements `Deserialize`.
There is also a type `CmdBorrow`, which doesn't do any copying unless necessary.
Note that to use it when automatically deriving `Deserialize`, the field of this
type needs to be marked with `#[serde(borrow)]` attribute.