2022-07-01 20:19:57 +02:00
|
|
|
# Nim-Libp2p
|
2023-01-20 15:47:40 +01:00
|
|
|
# Copyright (c) 2023 Status Research & Development GmbH
|
2022-07-01 20:19:57 +02:00
|
|
|
# Licensed under either of
|
|
|
|
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
|
|
|
# * MIT license ([LICENSE-MIT](LICENSE-MIT))
|
|
|
|
# at your option.
|
|
|
|
# This file may not be copied, modified, or distributed except according to
|
|
|
|
# those terms.
|
2018-11-27 14:16:04 +02:00
|
|
|
|
|
|
|
## This module implements transcoder interface.
|
|
|
|
import vbuffer
|
|
|
|
|
|
|
|
type Transcoder* = object
|
2018-12-05 17:24:07 +02:00
|
|
|
stringToBuffer*:
|
2023-06-07 13:12:49 +02:00
|
|
|
proc(s: string, vb: var VBuffer): bool {.nimcall, gcsafe, noSideEffect, raises: [].}
|
|
|
|
bufferToString*: proc(vb: var VBuffer, s: var string): bool {.
|
|
|
|
nimcall, gcsafe, noSideEffect, raises: []
|
2024-06-11 17:18:06 +02:00
|
|
|
.}
|
2023-06-07 13:12:49 +02:00
|
|
|
validateBuffer*:
|
|
|
|
proc(vb: var VBuffer): bool {.nimcall, gcsafe, noSideEffect, raises: [].}
|