Skip to main content

encode

Function encode 

Source
pub fn encode(
    value: f64,
    param_type: u8,
    bytewise: bool,
) -> Result<Encoded, String>
Expand description

Encode value for a parameter of param_type. An integer type takes the rounded value and refuses one outside the type’s range; with bytewise, UINT8 through INT32 are written into the field’s low bytes (the rest zero). A float type refuses a value that overflows a 32-bit float.