pub struct TemporalResponseSpec {
pub horizons: Arc<[u32]>,
pub policy: TemporalPolicy,
pub max_history_lag: Option<u32>,
}Expand description
Temporal attachment for a continuous-response query (ADR 0021).
When present, the query is a temporal cell: dose × horizon surfaces for
ResponseFunctional::MeanCurve, or horizon-indexed intervention responses.
Absence means a static response cell.
Fields§
§horizons: Arc<[u32]>Outcome evaluation horizons in time steps after the policy origin (each ≥ 1). Strictly increasing; at least one entry.
policy: TemporalPolicyTemporal intervention policy. Licensed 0.7 cells are Pulse and
single-step Sustained; Dynamic is refused here (use TemporalEffectQuery).
max_history_lag: Option<u32>Optional max history lag (steps) when unfolding; None = planner default.
Implementations§
Source§impl TemporalResponseSpec
impl TemporalResponseSpec
Sourcepub const MAX_HORIZONS: usize = MAX_TEMPORAL_RESPONSE_HORIZONS
pub const MAX_HORIZONS: usize = MAX_TEMPORAL_RESPONSE_HORIZONS
Horizon-count cap (MAX_TEMPORAL_RESPONSE_HORIZONS).
Sourcepub const POLICY_PULSE: &'static str = "pulse"
pub const POLICY_PULSE: &'static str = "pulse"
Wire tag for crate::intervention::TemporalPolicy::Pulse.
Sourcepub const POLICY_SUSTAINED: &'static str = "sustained"
pub const POLICY_SUSTAINED: &'static str = "sustained"
Wire tag for crate::intervention::TemporalPolicy::Sustained.
Sourcepub const ALLOWED_POLICIES: &'static [&'static str]
pub const ALLOWED_POLICIES: &'static [&'static str]
Policies Self::validate accepts on a response cell.
Sourcepub const DEFAULT_POLICY: &'static str = Self::POLICY_PULSE
pub const DEFAULT_POLICY: &'static str = Self::POLICY_PULSE
Default wire tag when a facade omits policy.
Sourcepub const DEFAULT_TREATMENT_LAG: u32 = 1
pub const DEFAULT_TREATMENT_LAG: u32 = 1
Default treatment_lag (policy origin -lag).
Sourcepub const fn license() -> TemporalResponseLicense
pub const fn license() -> TemporalResponseLicense
Machine-readable license for facades. Python must not hard-code these.
Sourcepub fn parse_policy(tag: &str, at: i32) -> Result<TemporalPolicy, QueryError>
pub fn parse_policy(tag: &str, at: i32) -> Result<TemporalPolicy, QueryError>
Parse a licensed response-policy wire tag at treatment offset at.
Sustained is the licensed single-step window [at, at].
§Errors
Unknown tag (including dynamic).
Sourcepub fn new(
horizons: impl Into<Arc<[u32]>>,
policy: TemporalPolicy,
max_history_lag: Option<u32>,
) -> Result<Self, QueryError>
pub fn new( horizons: impl Into<Arc<[u32]>>, policy: TemporalPolicy, max_history_lag: Option<u32>, ) -> Result<Self, QueryError>
Construct a temporal attachment after validating horizons and policy.
§Errors
Empty/non-increasing/oversized horizons, zero horizon, or invalid policy.
Sourcepub fn validate(&self) -> Result<(), QueryError>
pub fn validate(&self) -> Result<(), QueryError>
Sourcepub fn max_horizon(&self) -> u32
pub fn max_horizon(&self) -> u32
Largest requested horizon (guaranteed ≥ 1 after validation).
Sourcepub fn treatment_offset(&self) -> Result<i32, QueryError>
pub fn treatment_offset(&self) -> Result<i32, QueryError>
Trait Implementations§
Source§impl Clone for TemporalResponseSpec
impl Clone for TemporalResponseSpec
Source§fn clone(&self) -> TemporalResponseSpec
fn clone(&self) -> TemporalResponseSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more