fontconfig_actor/src/protocol.nim

19 lines
485 B
Nim

import
std/typetraits, preserves, std/tables
type
Serve* {.preservesRecord: "serve".} = object
`cap`* {.preservesEmbedded.}: Preserve[void]
FontAssertion* {.preservesRecord: "fontconfig".} = object
`pattern`*: Properties
`attributes`*: Properties
Properties* = Table[Symbol, Preserve[void]]
proc `$`*(x: Serve | FontAssertion | Properties): string =
`$`(toPreserve(x))
proc encode*(x: Serve | FontAssertion | Properties): seq[byte] =
encode(toPreserve(x))