Skip to main content

check_value

Function check_value 

Source
pub fn check_value(
    kind: &ParamKind,
    value: &ParamValue,
) -> Result<(), ValueError>
Expand description

Checks value against the type, bounds and options of kind.

ยงErrors

Returns ValueError::OutOfRange for a number outside the bounds or not finite, ValueError::UnknownOption for an index past the options, and ValueError::WrongKind for a value of another kind. A u32 is never accepted as a choice index.