pub struct GenerationTestResult {
pub temp_dir: TempDir,
pub project_dir: PathBuf,
pub generated_src_dir: PathBuf,
pub files: Vec<GeneratedFile>,
pub compilation_output: Option<Output>,
pub cargo_toml_path: PathBuf,
}Expand description
Result of a generation test
Fields§
§temp_dir: TempDirTemporary directory containing all generated files
project_dir: PathBufPath to the test project directory
generated_src_dir: PathBufPath to the generated source directory
files: Vec<GeneratedFile>Generated files
compilation_output: Option<Output>Compilation output (if compilation was run)
cargo_toml_path: PathBufPath to Cargo.toml
Implementations§
Source§impl GenerationTestResult
impl GenerationTestResult
Sourcepub fn compiled_successfully(&self) -> bool
pub fn compiled_successfully(&self) -> bool
Check if compilation succeeded
Sourcepub fn compilation_errors(&self) -> String
pub fn compilation_errors(&self) -> String
Get compilation errors
Sourcepub fn test_output(&self) -> Option<String>
pub fn test_output(&self) -> Option<String>
Get test output
Auto Trait Implementations§
impl Freeze for GenerationTestResult
impl RefUnwindSafe for GenerationTestResult
impl Send for GenerationTestResult
impl Sync for GenerationTestResult
impl Unpin for GenerationTestResult
impl UnwindSafe for GenerationTestResult
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