pub struct DataFakeConfig {
pub metadata: Option<Metadata>,
pub variables: HashMap<String, Value>,
pub schema: Value,
}Expand description
The main configuration structure for fake data generation.
This struct represents the complete configuration parsed from JSON, containing optional metadata, pre-defined variables, and the schema that defines the structure of generated data.
§Example
{
"metadata": { "name": "User Generator", "version": "1.0" },
"variables": { "userId": {"fake": ["uuid"]} },
"schema": { "id": {"var": "userId"}, "name": {"fake": ["name"]} }
}Fields§
§metadata: Option<Metadata>Optional metadata about this configuration (name, version, description).
variables: HashMap<String, Value>Pre-defined variables that are evaluated once and can be referenced in the schema.
Use {"var": "variableName"} in the schema to reference these values.
schema: ValueThe schema defining the structure and fake data types for the output.
Trait Implementations§
Source§impl Clone for DataFakeConfig
impl Clone for DataFakeConfig
Source§fn clone(&self) -> DataFakeConfig
fn clone(&self) -> DataFakeConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DataFakeConfig
impl Debug for DataFakeConfig
Source§impl<'de> Deserialize<'de> for DataFakeConfig
impl<'de> Deserialize<'de> for DataFakeConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DataFakeConfig
impl RefUnwindSafe for DataFakeConfig
impl Send for DataFakeConfig
impl Sync for DataFakeConfig
impl Unpin for DataFakeConfig
impl UnwindSafe for DataFakeConfig
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