Crates.io | serde_spaniel |
lib.rs | serde_spaniel |
version | 0.4.0 |
source | src |
created_at | 2020-10-15 01:45:34.28593 |
updated_at | 2022-08-02 00:41:54.325767 |
description | Spaniel Interactive Deserialiser for Serde |
homepage | https://github.com/komadori/serde_spaniel |
repository | https://github.com/komadori/serde_spaniel |
max_upload_size | |
id | 299841 |
size | 99,089 |
This crate is a Rust library which uses the Serde serialisation framework to capture data interactively from users.
[dependencies]
serde_spaniel = "0.4"
Spaniel can produce a value of any type which implements Serde's Deserialize
trait by interactively querying the user for information. For example, to
interactively obtain a vector of strings:
let strs: Vec<String> = serde_spaniel::from_console()?;
Hence, a user could input the value vec!["Hello", "World"]
using a dialogue
such as below:
seq {
[0] {
Add element?: y
string: Hello
}
[1] {
Add element?: y
string: World
}
[2] {
Add element?: n
}
}
Accept value?: y
Dual-licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 licence, shall be dual-licensed as above, without any additional terms or conditions.