9个版本 (4个重大变更)
| 0.6.0 | 2021年11月14日 | 
|---|---|
| 0.4.0 | 2021年5月27日 | 
| 0.3.3 | 2021年5月27日 | 
| 0.2.0 | 2021年5月27日 | 
| 0.1.1 | 2021年5月27日 | 
#1413 在 开发工具
每月23次下载
18KB
366 行
odata-rust-generator
生成表示OpenData文档模型的Rust代码
使用方法
命令行工具,用于从OData metadata.xml文档生成Rust代码
USAGE:
    odata-rust-generator [FLAGS] [OPTIONS] <input-file>
ARGS:
    <input-file>
            Path to metadata.xml file to generate code from
FLAGS:
    -h, --help
            Prints help information
        --no-empty-string-is-null
            Don't coerce empty strings into None when deserializing into Option<String>
        --no-expand
            Don't include NavigationProperties in the output structures. This makes deserializing
            $expand-ed properties impossible.
        --no-reflection
            Don't produce OpenDataModel traits and implementations for run-time reflection
        --no-serde
            Don't derive Serialize and Deserialize traits to all structs
    -V, --version
            Prints version information
OPTIONS:
    -o, --output-file <output-file>
            Write output to file. If not specified, output will be printed to stdout
示例
消费一个OData 3.0元数据文件,并在工作目录中生成一个odata.rs文件,包含元数据文件中定义的所有结构的Rust结构体表示。
$ odata-rust-generator --output-file ./odata.rs metadata.xml
依赖项
~5MB
~88K SLoC