Function array

Source
pub fn array<T: 'static + Clone>(
    begin: &'static str,
    item: Parser<T>,
    end: &'static str,
) -> Parser<Vec<T>>
Expand description

Consumes an array of items

Examples found in repository?
examples/json.rs (line 39)
38fn array() -> Parser<JsonValue> {
39    language::array("[", json(), "]") - JsonValue::Array
40}
41
42fn object() -> Parser<JsonValue> {
43    language::array("{", string() << seq_no_ws(":") & rec(json), "}") - to_btree - JsonValue::Object
44}