[][src]Macro secp256kfun::nzscalar

macro_rules! nzscalar {
    ($n:expr) => { ... };
}

Creates a Scalar<Secret, NonZero> from a non-zero u32.

Examples

This is how you use it:

use secp256kfun::nzscalar;
let three = nzscalar!(3);

This will fail to compile:

This example deliberately fails to compile
let zero = nzscalar!(0);

And so will this:

This example deliberately fails to compile
let three = 3;
let scalar = nzscalar!(three);