[−][src]Struct schemafy_snapshot::GenerateBuilder
A configurable builder for generating Rust types from a JSON schema.
The default options are usually fine. In that case, you can use
the generate()
convenience method instead.
Fields
root_name: Option<&'a str>
The name of the root type defined by the schema. If the schema
does not define a root type (some schemas are simply a
collection of definitions) then simply pass None
.
schemafy_path: &'a str
The module path to this crate. Some generated code may make use of types defined in this crate. Unless you have re-exported this crate or imported it under a different name, the default should be fine.
rustfmt_cmd: Option<Command>
A command to format the generated Rust code. The command should read from stdin and write to stdout.
Methods
impl<'a> GenerateBuilder<'a>
[src]
Trait Implementations
impl<'a> Default for GenerateBuilder<'a>
[src]
Auto Trait Implementations
impl<'a> Send for GenerateBuilder<'a>
impl<'a> !Sync for GenerateBuilder<'a>
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,