Skip to main content

register_adam_types

Function register_adam_types 

Source
pub fn register_adam_types(
    registry: &mut TypeRegistry,
) -> Result<(), TypeFunctionError>
Expand description

Registers the seven exact geometry names with their Euclid defaults.

Registers zero points, vectors, sizes, rectangles, boxes and angles, and an identity transform. Existing entries under these names follow [adam_lang::TypeRegistry::register]’s replacement semantics.

§Errors

Rejects a geometry name conflicting with an existing zero-operand type function.

  • Complexity: O(n) time and peak auxiliary space for existing registration metadata area n and the fixed set of seven geometry types.

§Examples

let mut registry = adam_lang::TypeRegistry::new();
cel_euclid::register_adam_types(&mut registry).unwrap();
assert!(registry.get("Point2D").unwrap().default_fn.is_some());