This module implements MultiCodec.List of officially supported codecs can BE found here https://github.com/multiformats/multicodec/blob/master/table.csv
Types
MultiCodec = distinct int
- Source Edit
MultiCodecError = enum MultiCodecNotSupported
- Source Edit
Procs
proc `$`(mc: MultiCodec): string {....raises: [], tags: [].}
- Returns string representation of MultiCodec mc. Source Edit
proc `==`(a, b: MultiCodec): bool {....raises: [], tags: [].}
- Returns true if MultiCodecs a and b are equal. Source Edit
proc `==`(mc: MultiCodec; code: int): bool {.inline, ...raises: [], tags: [].}
- Compares MultiCodec mc with integer code. Source Edit
proc `==`(mc: MultiCodec; name: string): bool {.inline, ...raises: [], tags: [].}
- Compares MultiCodec mc with string name. Source Edit
proc codec(mt: typedesc[MultiCodec]; code: int): MultiCodec {.inline, ...raises: [].}
- Return MultiCodec from integer representation code. If code is not valid multicodec code, then InvalidMultiCodec will be returned. Source Edit
proc codec(mt: typedesc[MultiCodec]; name: string): MultiCodec {.inline, ...raises: [].}
- Return MultiCodec from string representation name. If name is not valid multicodec name, then InvalidMultiCodec will be returned. Source Edit
proc hash(m: MultiCodec): Hash {.inline, ...raises: [], tags: [].}
- Hash procedure for tables. Source Edit
proc multiCodec(code: int): MultiCodec {.compileTime, ...raises: [], tags: [].}
- Generate MultiCodec from integer code at compile time. Source Edit
proc multiCodec(name: string): MultiCodec {.compileTime, ...raises: [], tags: [].}
- Generate MultiCodec from string name at compile time. Source Edit
proc write(vb: var VBuffer; mc: MultiCodec) {.inline, ...raises: [], tags: [].}
- Write MultiCodec to buffer vb. Source Edit