pub struct LoadFeeder {
pub rows: Vec<HashMap<String, String>>,
pub data: Option<String>,
pub format: Option<LoadFeederFormat>,
pub strategy: Option<LoadFeederStrategy>,
}Expand description
Parameterized test data (a data feeder) for a load scenario: an inline
dataset from which one row is selected per iteration and exposed to the
iteration’s templates as $iteration.data.<column>. Supply EITHER rows
(the primary form) OR data + format. Maps to the LoadFeeder schema.
Fields§
§rows: Vec<HashMap<String, String>>Inline dataset: a list of column-name to value maps, one per row.
data: Option<String>Optional raw inline dataset parsed server-side into rows per format.
format: Option<LoadFeederFormat>The format of data (required when data is set).
strategy: Option<LoadFeederStrategy>How a row is chosen each iteration.
Implementations§
Source§impl LoadFeeder
impl LoadFeeder
Sourcepub fn rows(rows: Vec<HashMap<String, String>>) -> Self
pub fn rows(rows: Vec<HashMap<String, String>>) -> Self
A feeder from an inline list of column-name to value rows.
Sourcepub fn data(data: impl Into<String>, format: LoadFeederFormat) -> Self
pub fn data(data: impl Into<String>, format: LoadFeederFormat) -> Self
A feeder from raw inline data parsed server-side as format.
Sourcepub fn strategy(self, strategy: LoadFeederStrategy) -> Self
pub fn strategy(self, strategy: LoadFeederStrategy) -> Self
Set the row-selection strategy.
Trait Implementations§
Source§impl Clone for LoadFeeder
impl Clone for LoadFeeder
Source§fn clone(&self) -> LoadFeeder
fn clone(&self) -> LoadFeeder
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 LoadFeeder
impl Debug for LoadFeeder
Source§impl Default for LoadFeeder
impl Default for LoadFeeder
Source§fn default() -> LoadFeeder
fn default() -> LoadFeeder
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LoadFeeder
impl<'de> Deserialize<'de> for LoadFeeder
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for LoadFeeder
impl PartialEq for LoadFeeder
Source§fn eq(&self, other: &LoadFeeder) -> bool
fn eq(&self, other: &LoadFeeder) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for LoadFeeder
impl Serialize for LoadFeeder
impl StructuralPartialEq for LoadFeeder
Auto Trait Implementations§
impl Freeze for LoadFeeder
impl RefUnwindSafe for LoadFeeder
impl Send for LoadFeeder
impl Sync for LoadFeeder
impl Unpin for LoadFeeder
impl UnsafeUnpin for LoadFeeder
impl UnwindSafe for LoadFeeder
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