Struct serdegen::Options[][src]

pub(crate) struct Options {
    input: Option<PathBuf>,
    language: Language,
    target_source_dir: Option<PathBuf>,
    with_runtimes: Vec<Runtime>,
    module_name: Option<String>,
    serde_package_name: Option<String>,
    use_c_style_enums: bool,
}

Fields

input: Option<PathBuf>

Path to the YAML-encoded Serde formats.

language: Language

Language for code generation.

target_source_dir: Option<PathBuf>

Directory where to write generated modules (otherwise print code on stdout).

with_runtimes: Vec<Runtime>

Optional runtimes to install in the target_source_dir (if applicable). Also triggers the generation of specialized methods for each runtime.

module_name: Option<String>

Module name for the Serde formats installed in the target_source_dir. Rust crates may contain a version number separated with a colon, e.g. “test:1.2.0”. (By default, the installer will use version “0.1.0”.)

serde_package_name: Option<String>

Optional package name (Python) or module path (Go) where to find Serde runtime dependencies.

use_c_style_enums: bool

Translate enums without variant data (c-style enums) into their equivalent in the target language, if the target language and the generator code support them.

Trait Implementations

Formats the value using the given formatter. Read more

Returns clap::App corresponding to the struct.

Builds the struct from clap::ArgMatches. It’s guaranteed to succeed if matches originates from an App generated by StructOpt::clap called on the same type, otherwise it must panic. Read more

Builds the struct from the command line arguments (std::env::args_os). Calls clap::Error::exit on failure, printing the error message and aborting the program. Read more

Builds the struct from the command line arguments (std::env::args_os). Unlike StructOpt::from_args, returns clap::Error on failure instead of aborting the program, so calling .exit is up to you. Read more

Gets the struct from any iterator such as a Vec of your making. Print the error message and quit the program in case of failure. Read more

Gets the struct from any iterator such as a Vec of your making. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.