gremlin-cli 0.1.0

A minimal Rust CLI for Apache TinkerPop™
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::print;
use gremlin_client::List;

use anyhow::Result;

pub fn fmt(list: &List) -> Result<String> {
    Ok(format!(
        "[{}]",
        list.iter()
            .map(|value| print::fmt(value))
            .collect::<Result<Vec<String>>>()?
            .join(",")
    ))
}