pub struct PlotBuilder<'a, T, R> { /* private fields */ }Expand description
Builder for generating a plot of the benchmark results and saving it to a file.
Implementations§
Source§impl<'a, T: Clone + Send + 'static, R: Send + 'static> PlotBuilder<'a, T, R>
impl<'a, T: Clone + Send + 'static, R: Send + 'static> PlotBuilder<'a, T, R>
Sourcepub fn new<P: AsRef<Path>>(bench: &'a Bench<'a, T, R>, filename: P) -> Self
pub fn new<P: AsRef<Path>>(bench: &'a Bench<'a, T, R>, filename: P) -> Self
Creates a new PlotBuilder with required parameters.
Mandatory parameters are required upfront and optional parameters are configured through method chaining.
§Parameters
bench: Reference to an instance ofBench.filename: Path of the file to save the plot to.
Sourcepub fn title(self, title: &str) -> Self
pub fn title(self, title: &str) -> Self
Sets the title of the plot.
By default, the title is empty.
Sourcepub fn build(self) -> Result<(), PlotBuilderError>
pub fn build(self) -> Result<(), PlotBuilderError>
Creates a plot of the benchmark results and saves it to a file.
Auto Trait Implementations§
impl<'a, T, R> Freeze for PlotBuilder<'a, T, R>
impl<'a, T, R> !RefUnwindSafe for PlotBuilder<'a, T, R>
impl<'a, T, R> Send for PlotBuilder<'a, T, R>
impl<'a, T, R> Sync for PlotBuilder<'a, T, R>
impl<'a, T, R> Unpin for PlotBuilder<'a, T, R>
impl<'a, T, R> !UnwindSafe for PlotBuilder<'a, T, R>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more