mirror of
https://github.com/logos-storage/nim-libp2p.git
synced 2026-01-02 13:43:11 +00:00
* Less exceptions more results * Fix daemonapi and interop tests * Add multibase * wip multiaddress * fix the build, consuming new result types * fix standard setup * Simplify match, rename into MaError, add more exaustive err text * Fix the CI issues * Fix directchat build * daemon api fixes * better err messages formatting Co-authored-by: Zahary Karadjov <zahary@gmail.com>
20 lines
760 B
Nim
20 lines
760 B
Nim
## Nim-Libp2p
|
|
## Copyright (c) 2018 Status Research & Development GmbH
|
|
## 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*: proc(s: string,
|
|
vb: var VBuffer): bool {.nimcall, gcsafe, raises: [Defect].}
|
|
bufferToString*: proc(vb: var VBuffer,
|
|
s: var string): bool {.nimcall, gcsafe, raises: [Defect].}
|
|
validateBuffer*: proc(vb: var VBuffer): bool {.nimcall, gcsafe, raises: [Defect].}
|