pub struct CoreConfig { /* private fields */ }Expand description
Core configuration resolved at startup.
This struct holds all configuration values that are determined once at process startup and remain immutable throughout the application lifecycle. It provides access to:
- Patient data storage directories
- OpenEHR Reference Model version
- VPR instance namespace
All paths are validated and canonicalized during construction.
Implementations§
Source§impl CoreConfig
impl CoreConfig
Sourcepub fn new(
patient_data_dir: PathBuf,
rm_system_version: RmVersion,
vpr_namespace: NonEmptyText,
) -> PatientResult<Self>
pub fn new( patient_data_dir: PathBuf, rm_system_version: RmVersion, vpr_namespace: NonEmptyText, ) -> PatientResult<Self>
Sourcepub fn patient_data_dir(&self) -> &Path
pub fn patient_data_dir(&self) -> &Path
Get the base patient data directory.
This is the root directory containing clinical/ and demographics/ subdirectories.
Sourcepub fn clinical_dir(&self) -> PathBuf
pub fn clinical_dir(&self) -> PathBuf
Get the clinical records directory.
Returns patient_data_dir/clinical/.
Sourcepub fn demographics_dir(&self) -> PathBuf
pub fn demographics_dir(&self) -> PathBuf
Get the demographics directory.
Returns patient_data_dir/demographics/.
Sourcepub fn rm_system_version(&self) -> RmVersion
pub fn rm_system_version(&self) -> RmVersion
Get the OpenEHR Reference Model version.
This determines which RM features and constraints are enforced.
Sourcepub fn vpr_namespace(&self) -> &str
pub fn vpr_namespace(&self) -> &str
Get the VPR namespace identifier.
Used to isolate different VPR instances or deployments.
Trait Implementations§
Source§impl Clone for CoreConfig
impl Clone for CoreConfig
Source§fn clone(&self) -> CoreConfig
fn clone(&self) -> CoreConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 CoreConfig
impl RefUnwindSafe for CoreConfig
impl Send for CoreConfig
impl Sync for CoreConfig
impl Unpin for CoreConfig
impl UnwindSafe for CoreConfig
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
§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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request