pub struct StudySettings { /* private fields */ }Expand description
Validated, immutable study manifest.
Workflow owns and validates replicate_settings. The application object
remains opaque until the user program requests it as one application-owned
type through Self::application. Scientific parameters remain in
config/parameters.json, and named paths remain in config/paths.json.
Implementations§
Source§impl StudySettings
impl StudySettings
Sourcepub fn load(study_root: impl Into<PathBuf>) -> Result<Self, ConfigurationError>
pub fn load(study_root: impl Into<PathBuf>) -> Result<Self, ConfigurationError>
Loads and validates study.json directly 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 source_path(&self) -> &Path
pub fn source_path(&self) -> &Path
Returns the exact study.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 replicate_settings(&self) -> ReplicateSettings
pub fn replicate_settings(&self) -> ReplicateSettings
Returns the complete replicate policy.
Sourcepub fn application<T>(&self) -> Result<T, ConfigurationError>where
T: DeserializeOwned,
pub fn application<T>(&self) -> Result<T, ConfigurationError>where
T: DeserializeOwned,
Decodes the application-owned object without rereading study.json.
Workflow does not interpret this object. Applications should use a
strongly typed Deserialize implementation—normally with
#[serde(deny_unknown_fields)]—to own and validate their settings.
Trait Implementations§
Source§impl Clone for StudySettings
impl Clone for StudySettings
Source§fn clone(&self) -> StudySettings
fn clone(&self) -> StudySettings
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for StudySettings
impl RefUnwindSafe for StudySettings
impl Send for StudySettings
impl Sync for StudySettings
impl Unpin for StudySettings
impl UnsafeUnpin for StudySettings
impl UnwindSafe for StudySettings
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
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> ⓘ
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