pub struct IntelligentMockGenerator { /* private fields */ }Expand description
Intelligent mock generator
Implementations§
Source§impl IntelligentMockGenerator
impl IntelligentMockGenerator
Sourcepub fn new(config: IntelligentMockConfig) -> Result<Self>
pub fn new(config: IntelligentMockConfig) -> Result<Self>
Create a new intelligent mock generator
Sourcepub async fn generate(&mut self) -> Result<Value>
pub async fn generate(&mut self) -> Result<Value>
Generate a mock response based on the configuration
Sourcepub async fn generate_batch(&mut self, count: usize) -> Result<Vec<Value>>
pub async fn generate_batch(&mut self, count: usize) -> Result<Vec<Value>>
Generate a batch of mock responses
Sourcepub fn update_config(&mut self, config: IntelligentMockConfig) -> Result<()>
pub fn update_config(&mut self, config: IntelligentMockConfig) -> Result<()>
Update configuration
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clear the cache
Sourcepub fn cache_size(&self) -> usize
pub fn cache_size(&self) -> usize
Get cache size
Sourcepub fn config(&self) -> &IntelligentMockConfig
pub fn config(&self) -> &IntelligentMockConfig
Get current configuration
Auto Trait Implementations§
impl Freeze for IntelligentMockGenerator
impl !RefUnwindSafe for IntelligentMockGenerator
impl Send for IntelligentMockGenerator
impl Sync for IntelligentMockGenerator
impl Unpin for IntelligentMockGenerator
impl !UnwindSafe for IntelligentMockGenerator
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