nim-libp2p/libp2p/transcoder.nim

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
732 B
Nim
Raw Normal View History

2022-07-01 18:19:57 +00:00
# Nim-Libp2p
2023-01-20 14:47:40 +00:00
# Copyright (c) 2023 Status Research & Development GmbH
2022-07-01 18:19:57 +00: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.
## This module implements transcoder interface.
import vbuffer
type Transcoder* = object
stringToBuffer*:
2023-06-07 11:12:49 +00: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: []
.}
2023-06-07 11:12:49 +00:00
validateBuffer*:
proc(vb: var VBuffer): bool {.nimcall, gcsafe, noSideEffect, raises: [].}