import_ventum_reticle

Function import_ventum_reticle 

Source
pub fn import_ventum_reticle(
    json: &str,
) -> Result<ReticleDescription, ReticleError>
Expand description

Import a Ventum reticle spec into a ReticleDescription.

json is a single Ventum reticle object (see the module documentation for the fields). The returned description is ready for hold_point_in_reticle: its marks are in milliradians from the optical center, focal_plane mirrors the spec’s plane, and reference_magnification carries the spec’s ref_magnification for an SFP reticle (1.0 for FFP, where subtensions are magnification-independent).

This is a pure transform: it does not itself reject an empty or all-decoration reticle (the resulting description simply carries no marks, which hold_point_in_reticle then reports as ReticleError::NoMarks). It DOES enforce crate::reticle::MAX_RETICLE_MARKS during expansion.

§Errors

Returns ReticleError::InvalidSpec if json cannot be parsed as a Ventum reticle, and ReticleError::TooManyMarks if repeat expansion would exceed the mark cap.