Struct StudyReader
pub struct StudyReader { /* private fields */ }Expand description
A read-only snapshot of one study.
Construction performs only study_config and one storage snapshot request.
In particular, it does not construct a sampler or scheduler and never
invokes finalization recovery. Call
refresh to replace the in-memory observation with a new
read; the backing storage remains untouched.
Implementations§
§impl StudyReader
impl StudyReader
pub fn backing_paths(&self) -> Option<Vec<PathBuf>>
pub fn backing_paths(&self) -> Option<Vec<PathBuf>>
Local source files protected from export replacement.
See Storage::backing_paths for the unknown-provenance contract.
pub fn new(storage: Arc<dyn Storage>, study: StudyId) -> Result<Self>
pub fn new(storage: Arc<dyn Storage>, study: StudyId) -> Result<Self>
Reads study from storage without opening any writable seam.
§Errors
Error::NotFound if the study does not exist, or a storage/decoding
error from the snapshot read.
pub fn from_storage(storage: Arc<dyn Storage>) -> Result<Self>
pub fn from_storage(storage: Arc<dyn Storage>) -> Result<Self>
Reads the only study in storage through its catalog capability.
This convenience keeps one-study adapters from selecting a numeric id by convention. Ambiguous and empty catalogs remain typed outcomes.
§Errors
Error::Unsupported if the storage has no catalog capability;
Error::NotFound for an empty catalog; and Error::Conflict for an
ambiguous catalog.
pub const fn config(&self) -> &StudyConfig
pub const fn config(&self) -> &StudyConfig
The persisted study configuration.
pub fn user_attrs(&self) -> Result<UserAttrs>
pub fn user_attrs(&self) -> Result<UserAttrs>
Reads the study’s user-owned metadata without opening a writable handle.
§Errors
A backend read error, including Error::Unsupported when study
attributes are unavailable.
pub const fn snapshot(&self) -> &StudySnapshot
pub const fn snapshot(&self) -> &StudySnapshot
The complete hydrated observation, including its consistency marker.
pub fn trial_fan(&self, trial: TrialId) -> Result<Option<ReplicateFan>>
pub fn trial_fan(&self, trial: TrialId) -> Result<Option<ReplicateFan>>
Reads the persisted replicate fan for one trial, if present.
§Errors
Reserved for source compatibility with the former direct storage read; the immutable snapshot lookup itself is infallible.
pub fn pending_finalizations(&self) -> &[OutboxRecord]
pub fn pending_finalizations(&self) -> &[OutboxRecord]
Pending terminal finalizations, ordered by the backend’s stable outbox
order and excluding fully completed (Done) records.
pub fn pending_outbox(&self) -> &[OutboxRecord]
pub fn pending_outbox(&self) -> &[OutboxRecord]
Alias for pending_finalizations.
pub fn policy_for(&self, name: &str) -> Result<Option<Open>>
pub fn policy_for(&self, name: &str) -> Result<Option<Open>>
Reads the persisted open-search policy for one parameter, if present.
This is a read-only configuration query used by inspection renderers; it does not register a policy or otherwise mutate the backend.
§Errors
Reserved for source compatibility with the former direct storage read; the immutable snapshot lookup itself is infallible.
pub const fn consistency(&self) -> SnapshotConsistency
pub const fn consistency(&self) -> SnapshotConsistency
Whether the backing backend provided one atomic read epoch.
pub fn refresh(&mut self) -> Result<()>
pub fn refresh(&mut self) -> Result<()>
Replaces this observation with a fresh storage read.
No writable operation is performed. A study’s configuration is immutable after creation, so this reader retains the configuration it already paired with the observation and refreshes only the snapshot.
§Errors
A storage read or side-state decoding error. The existing observation remains unchanged when refreshing fails.
Trait Implementations§
§impl Clone for StudyReader
impl Clone for StudyReader
§fn clone(&self) -> StudyReader
fn clone(&self) -> StudyReader
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more