pub struct StudyConfiguration { /* private fields */ }Expand description
One validated study-wide parameter registry.
Call StudyConfiguration::workload to obtain the only iterable space. A
workload automatically includes the global and containing component scopes.
Implementations§
Source§impl StudyConfiguration
impl StudyConfiguration
Sourcepub fn load(study_root: impl Into<PathBuf>) -> Result<Self, ConfigurationError>
pub fn load(study_root: impl Into<PathBuf>) -> Result<Self, ConfigurationError>
Loads config/parameters.json beneath study_root.
Sourcepub fn study_root(&self) -> &Path
pub fn study_root(&self) -> &Path
Returns the study root supplied to Self::load.
Sourcepub fn configuration_directory(&self) -> &Path
pub fn configuration_directory(&self) -> &Path
Returns the conventional config directory beneath the study root.
Sourcepub fn source_path(&self) -> &Path
pub fn source_path(&self) -> &Path
Returns the exact parameters.json source path.
Sourcepub fn source_json(&self) -> &[u8] ⓘ
pub fn source_json(&self) -> &[u8] ⓘ
Borrows the original validated source bytes without reserialization.
Sourcepub fn workload(
&self,
component: &str,
workload: &str,
) -> Result<WorkloadConfiguration, ConfigurationError>
pub fn workload( &self, component: &str, workload: &str, ) -> Result<WorkloadConfiguration, ConfigurationError>
Returns one exact component-qualified workload configuration.
Trait Implementations§
Source§impl Clone for StudyConfiguration
impl Clone for StudyConfiguration
Source§fn clone(&self) -> StudyConfiguration
fn clone(&self) -> StudyConfiguration
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 moreAuto Trait Implementations§
impl Freeze for StudyConfiguration
impl RefUnwindSafe for StudyConfiguration
impl Send for StudyConfiguration
impl Sync for StudyConfiguration
impl Unpin for StudyConfiguration
impl UnsafeUnpin for StudyConfiguration
impl UnwindSafe for StudyConfiguration
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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