cddl-codegen icon indicating copy to clipboard operation
cddl-codegen copied to clipboard

General integer bounds

Open rooooooooob opened this issue 2 years ago • 0 comments

e.g.

foo = 1..7

We only support these integer bounds when they map to existing rust primitives e.g. uint .le 255 turns to u8, etc.

Questions:

  1. Do we want to simply enforce the bound on deserializtion?
  2. Do we want to restrict access and only have throwing setters to check ranges?
  3. Do we want to use u64/i64 or make it fit in the smallest possible e.g. foo above would be u8.

rooooooooob avatar Apr 14 '23 01:04 rooooooooob