pub struct Options {
    pub source_path_const_name: Option<Cow<'static, str>>,
    pub serde_support: SerdeSupport,
    pub parse: ParseOptions,
    pub structs: StructOptions,
    pub enums: EnumOptions,
    pub files: FilesOptions,
    pub output: OutputOptions,
}
Expand description

Contains the full set of options for all public APIs in this crate.

Fields

source_path_const_name: Option<Cow<'static, str>>

In present, generates a const with this name that stores the path of the original markup file.

serde_support: SerdeSupport

Controls whether generated items should derive serde traits.

parse: ParseOptionsstructs: StructOptionsenums: EnumOptionsfiles: FilesOptionsoutput: OutputOptions

Implementations

Examples
assert_eq!(Options::new(), Options {
    source_path_const_name: Some("SOURCE_PATH".into()),
    serde_support: SerdeSupport::No,
    parse: ParseOptions::new(),
    structs: StructOptions::new(),
    enums: EnumOptions::new(),
    files: FilesOptions::new(),
    output: OutputOptions::new(),
});
Examples
assert_eq!(Options::serde_default(), Options {
    source_path_const_name: Some("SOURCE_PATH".into()),
    serde_support: SerdeSupport::Yes,
    parse: ParseOptions::new(),
    structs: StructOptions::new(),
    enums: EnumOptions::new(),
    files: FilesOptions::new(),
    output: OutputOptions::new(),
});
assert_eq!(Options::minimal(), Options {
    source_path_const_name: None,
    serde_support: SerdeSupport::No,
    parse: ParseOptions::new(),
    structs: StructOptions::minimal(),
    enums: EnumOptions::minimal(),
    files: FilesOptions::minimal(),
    output: OutputOptions::new(),
});

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Examples
assert_eq!(Options::default(), Options::new());
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. 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
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.