pub struct Template { /* private fields */ }Implementations§
Source§impl Template
impl Template
Sourcepub fn parse(path: &Path) -> Result<Self, TemplateError>
pub fn parse(path: &Path) -> Result<Self, TemplateError>
Reads, parses, and fully validates a template file. Fails fast on any invalid configuration before any requests are made.
Sourcepub fn generate_one(&self) -> Result<String, TemplateError>
pub fn generate_one(&self) -> Result<String, TemplateError>
Generates a single request body on demand. Thread-safe: each call creates its own RNG state, so concurrent VU tasks can call this simultaneously without contention.
Auto Trait Implementations§
impl Freeze for Template
impl RefUnwindSafe for Template
impl Send for Template
impl Sync for Template
impl Unpin for Template
impl UnsafeUnpin for Template
impl UnwindSafe for Template
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