pub struct GeneratorFixed<'types> { /* private fields */ }
Expand description
Finalized code generator that emits Rust types from resolved schema definitions.
GeneratorFixed
is produced by sealing a Generator
with Generator::into_fixed()
,
locking its configuration and enabling deterministic generation of all required types.
It offers methods to:
- generate a specific type
- generate all named types
- generate all available types
Once generation is complete, use finish
to retrieve the generated
DataTypes
output for rendering.
Implementations§
Source§impl<'types> GeneratorFixed<'types>
impl<'types> GeneratorFixed<'types>
Sourcepub fn generate_type(
self,
ident: Ident,
) -> Result<GeneratorFixed<'types>, Error>
pub fn generate_type( self, ident: Ident, ) -> Result<GeneratorFixed<'types>, Error>
Sourcepub fn generate_all_types(self) -> Result<Self, Error>
pub fn generate_all_types(self) -> Result<Self, Error>
Sourcepub fn generate_named_types(self) -> Result<Self, Error>
pub fn generate_named_types(self) -> Result<Self, Error>
Trait Implementations§
Auto Trait Implementations§
impl<'types> Freeze for GeneratorFixed<'types>
impl<'types> !RefUnwindSafe for GeneratorFixed<'types>
impl<'types> !Send for GeneratorFixed<'types>
impl<'types> !Sync for GeneratorFixed<'types>
impl<'types> Unpin for GeneratorFixed<'types>
impl<'types> !UnwindSafe for GeneratorFixed<'types>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more