#[non_exhaustive]pub struct Generation {
pub target: Target,
pub files: Vec<GeneratedFile>,
pub diagnostics: Vec<Diagnostic>,
pub dependencies: Dependencies,
}Expand description
The result of a generation: files in memory, everything the generator had to say, and the dependency list.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.target: TargetThe language the files are in; write names the
manifest after it.
files: Vec<GeneratedFile>§diagnostics: Vec<Diagnostic>§dependencies: DependenciesImplementations§
Source§impl Generation
impl Generation
Sourcepub fn new(target: Target, files: Vec<GeneratedFile>) -> Self
pub fn new(target: Target, files: Vec<GeneratedFile>) -> Self
A generation made of files alone, for callers that produce their
own and want write to manage them.
Sourcepub fn has_errors(&self) -> bool
pub fn has_errors(&self) -> bool
True when any diagnostic is an error, meaning some type was not emitted.
Trait Implementations§
Source§impl Clone for Generation
impl Clone for Generation
Auto Trait Implementations§
impl Forget for Generation
impl Freeze for Generationwhere
*const u8 is !null: Freeze,
PhantomData<GeneratedFile>: Freeze,
PhantomData<Diagnostic>: Freeze,
PhantomData<RustDependency>: Freeze,
PhantomData<GoDependency>: Freeze,
impl Move for Generation
impl RefUnwindSafe for Generation
impl Send for Generationwhere
RawVecInner: Send,
impl Sync for Generationwhere
RawVecInner: Sync,
impl Unpin for Generation
impl UnsafeUnpin for Generationwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<GeneratedFile>: UnsafeUnpin,
PhantomData<Diagnostic>: UnsafeUnpin,
PhantomData<RustDependency>: UnsafeUnpin,
PhantomData<GoDependency>: UnsafeUnpin,
impl UnwindSafe for Generationwhere
RawVecInner: UnwindSafe,
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