Skip to main content

ScientificProject

Struct ScientificProject 

Source
pub struct ScientificProject { /* private fields */ }
Expand description

Immutable configuration and state schema for one scientific project.

Cloning shares the parsed parameter, path, and schema allocations; it does not clone JSON values or scientific payloads.

Implementations§

Source§

impl ScientificProject

Source

pub fn load( project_root: impl Into<PathBuf>, ) -> Result<Self, ScientificProjectError>

Loads all four conventional JSON documents from project_root/config.

Source

pub fn load_with_state_schema( project_root: impl Into<PathBuf>, state_schema: SystemStateSchema, ) -> Result<Self, ScientificProjectError>

Loads task and path configuration with a model-owned state schema.

This form reads only config/fixed.json, config/sweep.json, and config/paths.json. It is intended for scientific crates whose public model fixes one canonical state contract and therefore rejects project-specific schema changes. The supplied schema is already validated by its type and is retained without reparsing or cloning its field allocation.

Source

pub fn project_root(&self) -> &Path

Returns the project root exactly as supplied during loading.

Source

pub fn configuration_directory(&self) -> &Path

Returns the conventional config/ directory.

Source

pub fn parameters(&self) -> &ParameterSpace

Borrows the fixed-and-swept task parameter space.

Source

pub fn paths(&self) -> &ProjectPaths

Borrows the named project path dictionary.

Source

pub fn resolve_path(&self, key: &str) -> Result<PathBuf, ConfigurationError>

Resolves one named project path against the project root.

Source

pub fn task_count(&self) -> u64

Returns the checked number of complete task configurations.

Source

pub fn task_config( &self, ordinal: u64, ) -> Result<TaskConfig, ConfigurationError>

Resolves one complete task configuration by deterministic ordinal.

Source

pub fn task_configs(&self) -> TaskConfigIter

Lazily iterates every complete fixed/sweep/path task configuration.

Source

pub fn task_configs_matching<V>( &self, key: impl Into<String>, value: V, ) -> Result<MatchingTaskConfigIter, ConfigurationError>
where V: Serialize,

Lazily iterates every task matching one exact sweep key/value pair.

Source

pub fn unique_task_config_matching<V>( &self, key: impl Into<String>, value: V, ) -> Result<TaskConfig, ConfigurationError>
where V: Serialize,

Returns the unique task matching one exact sweep key/value pair.

Source

pub fn state_schema(&self) -> &SystemStateSchema

Borrows the shared project-owned or model-owned system-state schema.

Source

pub fn configuration(&self) -> &ProjectConfig

Borrows the lower-level three-file configuration facade.

Source

pub fn into_parts(self) -> (ProjectConfig, SystemStateSchema)

Consumes the project and returns its configuration and state schema.

Trait Implementations§

Source§

impl Clone for ScientificProject

Source§

fn clone(&self) -> ScientificProject

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ScientificProject

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats bounded project facts without source JSON or payload data.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.