pub struct ParamValues(/* private fields */);Expand description
2026-09-26: The edited values handed to Benchmark::configure.
Accessors return Err on a missing or mistyped key rather than falling
back to a default: a benchmark that reads a key its schema never declared
is a bug, and a substituted value would hide it behind a plausible number.
float also accepts an Int.
Implementations§
Source§impl ParamValues
impl ParamValues
Sourcepub fn iter(&self) -> impl Iterator<Item = (&str, &ParamValue)>
pub fn iter(&self) -> impl Iterator<Item = (&str, &ParamValue)>
2026-09-26: Every (key, value) pair, in key order (the map is a
BTreeMap), so records built from the same values diff cleanly.
Sourcepub fn to_strings(&self) -> BTreeMap<String, String>
pub fn to_strings(&self) -> BTreeMap<String, String>
2026-09-26: The whole configuration as text, for persistence.
Sourcepub fn from_overrides<'a>(
specs: &[ParamSpec],
overrides: impl IntoIterator<Item = (&'a str, &'a str)>,
) -> Result<Self>
pub fn from_overrides<'a>( specs: &[ParamSpec], overrides: impl IntoIterator<Item = (&'a str, &'a str)>, ) -> Result<Self>
2026-09-26: Schema defaults with overrides applied on top.
Every value is routed through ParamKind::parse, so an out-of-domain
override fails here rather than mid-run. An unknown key is an error
naming the valid ones: an ignored --param typo would measure
something other than what was asked for.
Source§impl ParamValues
impl ParamValues
Sourcepub fn defaults(specs: &[ParamSpec]) -> Self
pub fn defaults(specs: &[ParamSpec]) -> Self
2026-09-26: Starting values for a schema: each spec’s default.
pub fn set(&mut self, key: impl Into<String>, value: ParamValue)
pub fn get(&self, key: &str) -> Option<&ParamValue>
pub fn bool(&self, key: &str) -> Result<bool>
pub fn int(&self, key: &str) -> Result<i64>
pub fn float(&self, key: &str) -> Result<f64>
pub fn text(&self, key: &str) -> Result<&str>
pub fn int_list(&self, key: &str) -> Result<&[i64]>
Sourcepub fn validate_against(&self, specs: &[ParamSpec]) -> Result<()>
pub fn validate_against(&self, specs: &[ParamSpec]) -> Result<()>
2026-09-26: Refuse an unknown key, a missing key, or a value that does
not parse-check against its spec. Headless runs call it before a run,
and every driver’s configure except vision’s and video’s calls it
first, so a bad field is reported against the field rather than as a
mid-run failure.
Trait Implementations§
Source§impl Clone for ParamValues
impl Clone for ParamValues
Source§fn clone(&self) -> ParamValues
fn clone(&self) -> ParamValues
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ParamValues
impl Debug for ParamValues
Source§impl Default for ParamValues
impl Default for ParamValues
Source§fn default() -> ParamValues
fn default() -> ParamValues
Source§impl PartialEq for ParamValues
impl PartialEq for ParamValues
impl StructuralPartialEq for ParamValues
Auto Trait Implementations§
impl Freeze for ParamValues
impl RefUnwindSafe for ParamValues
impl Send for ParamValues
impl Sync for ParamValues
impl Unpin for ParamValues
impl UnwindSafe for ParamValues
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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