Skip to main content

integer

Function integer 

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

An integer, in whatever spelling the representation admits.

Which spellings those are is the representation’s own rule and is stated by Source::as_integer — a JSON number is a double and stops carrying a 64-bit integer exactly past 2^53, which is a fact about JSON and not about IDL. This is where the type asks for an integer, so that no caller reaches past the contract to get one and no backend accepts a spelling the other two refuse.

§Errors

ProbeError::Mismatch.