pub enum RequestSource {
Static(RequestConfig),
Dynamic(RequestGenerator),
}Expand description
Source of request configuration - either static or dynamically generated.
This enum represents how requests are configured in a benchmark. It is used internally by the builder and executor, but is exposed publicly as part of the configuration API.
You typically don’t construct this directly; instead use
BenchmarkBuilder::url for static configuration or
BenchmarkBuilder::request_fn for dynamic generation.
Variants§
Static(RequestConfig)
Static configuration used for all requests.
Created when using BenchmarkBuilder::url.
Dynamic(RequestGenerator)
Dynamic generator function called for each request.
Created when using BenchmarkBuilder::request_fn.
Trait Implementations§
Source§impl Clone for RequestSource
impl Clone for RequestSource
Source§fn clone(&self) -> RequestSource
fn clone(&self) -> RequestSource
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 moreAuto Trait Implementations§
impl !Freeze for RequestSource
impl !RefUnwindSafe for RequestSource
impl Send for RequestSource
impl Sync for RequestSource
impl Unpin for RequestSource
impl UnsafeUnpin for RequestSource
impl !UnwindSafe for RequestSource
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