19 lines
450 B
Nim
19 lines
450 B
Nim
|
|
import
|
|
std/typetraits, preserves, std/tables
|
|
|
|
type
|
|
Serve* {.preservesRecord: "serve".} = object
|
|
`cap`* {.preservesEmbedded.}: Preserve[void]
|
|
|
|
FontAssertion* {.preservesRecord: "fontconfig".} = object
|
|
`properties`*: Table[Symbol, Preserve[void]]
|
|
`file`*: string
|
|
`index`*: BiggestInt
|
|
|
|
proc `$`*(x: Serve | FontAssertion): string =
|
|
`$`(toPreserve(x))
|
|
|
|
proc encode*(x: Serve | FontAssertion): seq[byte] =
|
|
encode(toPreserve(x))
|