712 B
712 B
Architecture Overview
- Crate facade in
src/lib.rsre-exports curated types. - Error handling with
thiserrorviaMedicalErrorandtype Result<T>. - Core domain types in
src/types.rs(e.g.,BloodPressure,Blood). - Organ system:
- Trait and common
OrganInfoinsrc/organs/mod.rs - Per-organ modules (Heart, Lungs, Brain, etc.) implement
Organ
- Trait and common
Patientinsrc/patient.rsowns a vector ofBox<dyn Organ>and coordinates updates.- FFI (feature
ffi) insrc/ffi.rs, headerffi/medicallib.h. - Examples in
examples/, benches inbenches/(criterion).
Inter-organ communication examples:
- Lungs SpO2 influences Heart rate.
- Kidneys GFR produces urine into Bladder volume.