Skip to main content

SubjectBuilderExt

Trait SubjectBuilderExt 

pub trait SubjectBuilderExt {
    // Required method
    fn builder(id: impl Into<String>) -> SubjectBuilder;
}
Expand description

Extension trait that enables Subject::builder(...).

Most users do not need to import [SubjectBuilder] directly. Import this trait from the crate root or [crate::prelude] and then start with Subject::builder("id").

Required Methods§

fn builder(id: impl Into<String>) -> SubjectBuilder

Create a new SubjectBuilder with the specified ID

§Arguments
  • id - The subject identifier
§Example
use pharmsol::*;

let subject = Subject::builder("patient_001")
    .bolus(0.0, 100.0, "depot")
    .observation(1.0, 10.5, "cp")
    .build();

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§