jtd-codegen 0.1.4

Generate code from JSON Typedef schemas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pub mod csharp;
pub mod go;
pub mod java;
pub mod rust;
pub mod typescript;

use clap::{App, ArgMatches};
use failure::Error;
use jtd::Schema;

pub trait Target
where
    Self: Sized,
{
    fn args<'a, 'b>(app: App<'a, 'b>) -> App<'a, 'b>;
    fn from_args(matches: &ArgMatches) -> Result<Option<Self>, Error>;
    fn codegen(&self, schema: &Schema) -> Result<(), Error>;
}