pub struct BackstoryGenerator { /* private fields */ }Expand description
Generator for creating persona backstories
Uses domain-specific templates and persona traits to generate coherent narrative backstories that explain persona behavior.
Implementations§
Source§impl BackstoryGenerator
impl BackstoryGenerator
Sourcepub fn generate_backstory(&self, persona: &PersonaProfile) -> Result<String>
pub fn generate_backstory(&self, persona: &PersonaProfile) -> Result<String>
Generate a backstory for a persona based on its traits and domain
Uses the persona’s seed for deterministic generation, ensuring the same persona always gets the same backstory.
Sourcepub fn add_template(&mut self, domain: Domain, template: BackstoryTemplate)
pub fn add_template(&mut self, domain: Domain, template: BackstoryTemplate)
Add a custom backstory template for a domain
Trait Implementations§
Source§impl Debug for BackstoryGenerator
impl Debug for BackstoryGenerator
Auto Trait Implementations§
impl Freeze for BackstoryGenerator
impl RefUnwindSafe for BackstoryGenerator
impl Send for BackstoryGenerator
impl Sync for BackstoryGenerator
impl Unpin for BackstoryGenerator
impl UnwindSafe for BackstoryGenerator
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