pub struct IOBatchBuilder { /* private fields */ }Expand description
Batch builder for multiple testcases.
use hpdg::io::IOBatchBuilder;
let batch = IOBatchBuilder::new("case".to_string())
.range(1, 3)
.data_id_separator("_".to_string())
.build();
assert_eq!(batch.len(), 3);Implementations§
Source§impl IOBatchBuilder
impl IOBatchBuilder
Sourcepub fn data_ids<I: IntoIterator<Item = usize>>(self, ids: I) -> Self
pub fn data_ids<I: IntoIterator<Item = usize>>(self, ids: I) -> Self
Set the explicit testcase ids that should be generated.
Sourcepub fn range(self, start: usize, end_inclusive: usize) -> Self
pub fn range(self, start: usize, end_inclusive: usize) -> Self
Use an inclusive numeric range of testcase ids.
Sourcepub fn input_suffix(self, input_suffix: String) -> Self
pub fn input_suffix(self, input_suffix: String) -> Self
Set the input suffix for every generated IO value.
Sourcepub fn output_suffix(self, output_suffix: String) -> Self
pub fn output_suffix(self, output_suffix: String) -> Self
Set the output suffix for every generated IO value.
Sourcepub fn data_id_separator(self, separator: String) -> Self
pub fn data_id_separator(self, separator: String) -> Self
Set the separator inserted before each testcase id.
Sourcepub fn data_id_width(self, width: Option<usize>) -> Self
pub fn data_id_width(self, width: Option<usize>) -> Self
Set zero-padding width for every testcase id in the batch.
Auto Trait Implementations§
impl Freeze for IOBatchBuilder
impl RefUnwindSafe for IOBatchBuilder
impl Send for IOBatchBuilder
impl Sync for IOBatchBuilder
impl Unpin for IOBatchBuilder
impl UnsafeUnpin for IOBatchBuilder
impl UnwindSafe for IOBatchBuilder
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