19 lines
241 B
Nim
Raw Normal View History

2022-07-15 15:28:42 -05:00
import ./key
type
Query* = object
key: QueryKey
QueryKey* = Key
QueryResponse* = tuple[key: Key, data: seq[byte]]
proc init*(
T: type Query,
key: QueryKey): T =
T(key: key)
proc key*(self: Query): QueryKey =
self.key