wip
This commit is contained in:
parent
543b2f3dd0
commit
656b8df9fa
|
@ -1,6 +1,9 @@
|
|||
import
|
||||
std/typetraits
|
||||
|
||||
type
|
||||
DefaultFlavor* = object
|
||||
|
||||
template serializationFormatImpl(Name: untyped,
|
||||
mimeTypeName: static string = "") {.dirty.} =
|
||||
# This indirection is required in order to be able to generate the
|
||||
|
@ -28,7 +31,7 @@ template setWriter*(Format, FormatWriter, PreferredOutput: distinct type) =
|
|||
else:
|
||||
template WriterType*(T: type Format): type = FormatWriter
|
||||
template Writer*(T: type Format): type = FormatWriter
|
||||
|
||||
|
||||
template PreferredOutputType*(T: type Format): type = PreferredOutput
|
||||
|
||||
template createFlavor*(ModifiedFormat, FlavorName: untyped) =
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
import
|
||||
std/typetraits,
|
||||
stew/shims/macros, stew/objects,
|
||||
./errors
|
||||
./errors, ./formats
|
||||
|
||||
type
|
||||
DefaultFlavor* = object
|
||||
FieldTag*[RecordType: object; fieldName: static string] = distinct void
|
||||
|
||||
export
|
||||
DefaultFlavor
|
||||
|
||||
let
|
||||
# Identifiers affecting the public interface of the library:
|
||||
valueSym {.compileTime.} = ident "value"
|
||||
|
|
Loading…
Reference in New Issue