readme: add

This commit is contained in:
Antonis Geralis 2022-09-04 20:31:59 +03:00
parent 618f6d663d
commit 9e50082946
1 changed files with 4 additions and 2 deletions

View File

@ -137,11 +137,13 @@ exported by `drchaos/mutator`.
User overloads must use the following proc signatures:
```nim
proc fromData*(data: openArray[byte]; pos: var int; output: var T)
proc toData*(data: var openArray[byte]; pos: var int; input: T)
proc fromData(data: openArray[byte]; pos: var int; output: var T)
proc toData(data: var openArray[byte]; pos: var int; input: T)
proc byteSize(x: T): int {.inline.} ## The size that will be consumed by the serialized type in bytes.
```
This is only necessary for destructor-based types.
`drchaos/common` exports read/write procs that assist with this task.
### What's not supported