Skip to main content

decode_version

Function decode_version 

Source
pub fn decode_version(
    cx: &mut Cx,
    value: Value,
    expected: u32,
    class: Symbol,
) -> Result<()>
Expand description

Checks that a citizen’s version argument equals the expected version.

Citizen constructors carry a leading v<N> version symbol; this verifies it matches, returning an error naming class otherwise.