pub struct Config {
pub rig: RigConfig,
pub checks: BTreeMap<String, CheckSettings>,
pub runtime_nodes: RuntimeNodesConfig,
pub clips: BTreeMap<String, ClipExpectations>,
pub gait_groups: BTreeMap<String, GaitGroup>,
pub sync_groups: BTreeMap<String, SyncGroup>,
}Expand description
The whole configuration. Field names match the animsmith.toml
sections.
Self::runtime_nodes is an intentional pre-1.0 additive public field.
Embedders that construct this struct with a literal must add
runtime_nodes: RuntimeNodesConfig::default() or use
..Config::default().
Fields§
§rig: RigConfigDeclarative rig profile and inline role bindings. Frontends resolve
these into crate::ResolvedRoles before creating a check context;
the core runner does not apply them automatically.
checks: BTreeMap<String, CheckSettings>Per-check settings keyed by stable check id.
runtime_nodes: RuntimeNodesConfigShared engine-neutral policy for source nodes addressed by the runtime.
clips: BTreeMap<String, ClipExpectations>Keyed by clip name or glob (* wildcards). An exact-name entry
overrides glob entries; among globs, later (lexicographically
greater) keys win on conflict.
gait_groups: BTreeMap<String, GaitGroup>Named gait groups consumed by the gait-group check.
sync_groups: BTreeMap<String, SyncGroup>Named same-time / absolute-sync groups consumed by sync-group.
Implementations§
Source§impl Config
impl Config
Sourcepub fn validate(&self) -> Result<(), ConfigValidationError>
pub fn validate(&self) -> Result<(), ConfigValidationError>
Validate values that can also be supplied through the public Rust configuration structs.
Deserialization rejects the same invalid values at the file/config
boundary. Embedded callers that construct Config directly must call
this method before passing it to measurement-only APIs;
crate::evaluate_checks always calls it before inspecting or
executing the supplied check catalog.
§Errors
Returns ConfigValidationError::InvalidCheckSetting when a direct
per-check numeric policy is outside its documented finite domain,
ConfigValidationError::InvalidClipLoopCap when a clip selector
contains a negative or non-finite per-clip loop cap,
ConfigValidationError::ConflictingClipMovementOwner when one clip
selector declares both movement_owner_xz and its in_place alias,
ConfigValidationError::ConflictingRuntimeNodeSelectors when shared
runtime-node selectors and the rest-world-scale compatibility alias are
both declared,
ConfigValidationError::InvalidSyncGroupTolerance when a same-time
group has an invalid timing tolerance, or
ConfigValidationError::InvalidTimeComplementSetting when an
enabled time-complement policy has an invalid threshold.
Sourcepub fn expectations_for(&self, clip: &str) -> ClipExpectations
pub fn expectations_for(&self, clip: &str) -> ClipExpectations
Effective expectations for a clip: glob matches (in key order) overlaid, exact match last.
Each selector entry’s legacy in_place input is normalized into
ClipExpectations::movement_owner_xz before the field overlay. The
returned value therefore always has ClipExpectations::in_place set
to None. Call Config::validate before this method so same-entry
alias conflicts are rejected rather than resolved by precedence.
Sourcepub fn check_settings(&self, id: &str) -> CheckSettings
pub fn check_settings(&self, id: &str) -> CheckSettings
Settings for a check id, or defaults when the id is not present.
Sourcepub fn runtime_node_selectors(&self) -> Option<RuntimeNodeSelectors>
pub fn runtime_node_selectors(&self) -> Option<RuntimeNodeSelectors>
The normalized runtime-node authority, if one is declared.
The shared RuntimeNodesConfig::selectors field is used when it is
present. Callers must first call Self::validate: simultaneous use
of the legacy checks.rest-world-scale.node_selectors alias is rejected
and has no precedence rule. An absent field or explicit empty list
returns None and declares no policy.
Sourcepub fn loop_seam_min_stride_step_m(&self) -> f64
pub fn loop_seam_min_stride_step_m(&self) -> f64
Effective stride floor for loop-seam metrics, in metres.