Skip to main content

integer_for

Function integer_for 

Source
pub fn integer_for<V: Source>(
    kind: PrimitiveKind,
    value: &V,
    path: &str,
) -> Result<i128, ProbeError>
Expand description

An integer that fits the primitive it is destined for.

The range check belongs with the dialect and not with the serialiser: an octet of 300 is a value file that says something the type cannot hold, and a backend that emitted 300 into a C uint8_t would put 44 on the wire without a word.

ยงErrors

ProbeError::Mismatch.