pub struct PersonasConfig {
pub personas: Vec<Persona>,
pub active_persona: Option<String>,
}Expand description
Personas configuration for consistent data generation
Fields§
§personas: Vec<Persona>List of configured personas
active_persona: Option<String>Active persona name (if None, uses first persona or defaults)
Implementations§
Source§impl PersonasConfig
impl PersonasConfig
Sourcepub fn get_active_persona(&self) -> Option<&Persona>
pub fn get_active_persona(&self) -> Option<&Persona>
Get the active persona, or the first persona if no active persona is set
Trait Implementations§
Source§impl Clone for PersonasConfig
impl Clone for PersonasConfig
Source§fn clone(&self) -> PersonasConfig
fn clone(&self) -> PersonasConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PersonasConfig
impl Debug for PersonasConfig
Source§impl Default for PersonasConfig
impl Default for PersonasConfig
Source§fn default() -> PersonasConfig
fn default() -> PersonasConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PersonasConfig
impl<'de> Deserialize<'de> for PersonasConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PersonasConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PersonasConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for PersonasConfig
impl Serialize for PersonasConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for PersonasConfig
impl RefUnwindSafe for PersonasConfig
impl Send for PersonasConfig
impl Sync for PersonasConfig
impl Unpin for PersonasConfig
impl UnsafeUnpin for PersonasConfig
impl UnwindSafe for PersonasConfig
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