pub struct BatchGenerator { /* private fields */ }Expand description
Batch data generator for generating multiple datasets
Implementations§
Source§impl BatchGenerator
impl BatchGenerator
Sourcepub fn new(schemas: Vec<SchemaDefinition>, config: DataConfig) -> Result<Self>
pub fn new(schemas: Vec<SchemaDefinition>, config: DataConfig) -> Result<Self>
Create a new batch generator
Sourcepub async fn generate_batch(&mut self) -> Result<Vec<GenerationResult>>
pub async fn generate_batch(&mut self) -> Result<Vec<GenerationResult>>
Generate data for all schemas
Sourcepub async fn generate_with_relationships(
&mut self,
) -> Result<Vec<GenerationResult>>
pub async fn generate_with_relationships( &mut self, ) -> Result<Vec<GenerationResult>>
Generate data with cross-schema relationships
Sourcepub fn schemas(&self) -> Vec<&SchemaDefinition>
pub fn schemas(&self) -> Vec<&SchemaDefinition>
Get all schemas
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BatchGenerator
impl !RefUnwindSafe for BatchGenerator
impl Send for BatchGenerator
impl Sync for BatchGenerator
impl Unpin for BatchGenerator
impl !UnwindSafe for BatchGenerator
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