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: ParseOptions
See ParseOptions
.
structs: StructOptions
See StructOptions
.
enums: EnumOptions
See EnumOptions
.
files: FilesOptions
See FilesOptions
.
output: OutputOptions
See OutputOptions
.
Implementations
sourceimpl Options
impl Options
sourcepub const fn new() -> Options
pub const fn new() -> Options
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(),
});
sourcepub const fn serde_default() -> Options
pub const fn serde_default() -> Options
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(),
});
sourcepub const fn minimal() -> Options
pub const fn minimal() -> Options
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
impl Eq for Options
impl StructuralEq for Options
impl StructuralPartialEq for Options
Auto Trait Implementations
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnwindSafe for Options
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.