Skip to main content

assert_dimension

Function assert_dimension 

Source
pub fn assert_dimension(
    expr: &Ex,
    dims: &DimMap,
    expected: ConstDim,
) -> Result<(), String>
Expand description

Infer the dimension and assert it matches the expected dimension.

Returns Ok(()) if it matches, or Err(message) describing the mismatch.