This module implements MultiAddress.
Types
IpTransportProtocol = enum tcpProtocol, udpProtocol
- Source Edit
MaInvalidAddress = object of MaError
- Source Edit
MaPatResult = object flag*: bool rem*: seq[MultiCodec]
- Source Edit
MaPattern = object operator*: MaPatternOp args*: seq[MaPattern] value*: MultiCodec
- Source Edit
MaPatternOp = enum Eq, Or, And
- Source Edit
MAProtocol = object mcodec*: MultiCodec size*: int kind: MAKind coder*: Transcoder
- Source Edit
MultiAddress = object data*: VBuffer
- Source Edit
Consts
CircuitRelay = (operator: Eq, args: [], value: 290)
- Source Edit
DNS = (operator: Or, args: [(operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0)
- Source Edit
HTTP = (operator: Or, args: [(operator: And, args: [(operator: Or, args: [( operator: And, args: [(operator: Or, args: [ (operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 6)], value: 0), (operator: And, args: [(operator: Or, args: [ (operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 6)], value: 0)], value: 0), (operator: Eq, args: [], value: 480)], value: 0), (operator: And, args: [(operator: Or, args: [ (operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 480)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 480)], value: 0)], value: 0)
- Source Edit
HTTPS = (operator: Or, args: [(operator: And, args: [(operator: Or, args: [( operator: And, args: [(operator: Or, args: [ (operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 6)], value: 0), (operator: And, args: [(operator: Or, args: [ (operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 6)], value: 0)], value: 0), (operator: Eq, args: [], value: 443)], value: 0), (operator: And, args: [(operator: Or, args: [ (operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 443)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 443)], value: 0)], value: 0)
- Source Edit
IP = (operator: Or, args: [(operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0)
- Source Edit
IPFS = (operator: And, args: [(operator: Or, args: [(operator: Or, args: [( operator: And, args: [(operator: Or, args: [ (operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 6)], value: 0), (operator: And, args: [(operator: Or, args: [ (operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 6)], value: 0)], value: 0), (operator: And, args: [(operator: Or, args: [( operator: And, args: [(operator: Or, args: [ (operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 273)], value: 0), (operator: And, args: [(operator: Or, args: [ (operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 273)], value: 0)], value: 0), (operator: Eq, args: [], value: 302)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: And, args: [(operator: Or, args: [ (operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 273)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 273)], value: 0)], value: 0), (operator: Eq, args: [], value: 460)], value: 0), (operator: Or, args: [( operator: And, args: [(operator: Or, args: [(operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 6)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 6)], value: 0)], value: 0), (operator: Eq, args: [], value: 477)], value: 0), ( operator: And, args: [(operator: Or, args: [(operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 6)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 6)], value: 0)], value: 0), (operator: Eq, args: [], value: 478)], value: 0)], value: 0)], value: 0), (operator: Eq, args: [], value: 421)], value: 0)
- Source Edit
P2PPattern = (operator: Eq, args: [], value: 421)
- Source Edit
QUIC = (operator: And, args: [(operator: Or, args: [(operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 273)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 273)], value: 0)], value: 0), (operator: Eq, args: [], value: 460)], value: 0)
- Source Edit
Reliable = (operator: Or, args: [(operator: Or, args: [(operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 6)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 6)], value: 0)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: And, args: [(operator: Or, args: [ (operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 273)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 273)], value: 0)], value: 0), (operator: Eq, args: [], value: 302)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: And, args: [(operator: Or, args: [ (operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 273)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 273)], value: 0)], value: 0), (operator: Eq, args: [], value: 460)], value: 0), (operator: Or, args: [( operator: And, args: [(operator: Or, args: [(operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 6)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 6)], value: 0)], value: 0), (operator: Eq, args: [], value: 477)], value: 0), ( operator: And, args: [(operator: Or, args: [(operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 6)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 6)], value: 0)], value: 0), (operator: Eq, args: [], value: 478)], value: 0)], value: 0)], value: 0)
- Source Edit
TCP = (operator: Or, args: [(operator: And, args: [(operator: Or, args: [ (operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 6)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 6)], value: 0)], value: 0)
- Source Edit
TcpOnion3 = (operator: And, args: [(operator: Or, args: [(operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 6)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 6)], value: 0)], value: 0), (operator: Eq, args: [], value: 445)], value: 0)
- Source Edit
TranscoderDNS = (stringToBuffer: dnsStB, bufferToString: dnsBtS, validateBuffer: dnsVB)
- Source Edit
TranscoderIP4 = (stringToBuffer: ip4StB, bufferToString: ip4BtS, validateBuffer: ip4VB)
- Source Edit
TranscoderIP6 = (stringToBuffer: ip6StB, bufferToString: ip6BtS, validateBuffer: ip6VB)
- Source Edit
TranscoderIP6Zone = (stringToBuffer: ip6zoneStB, bufferToString: ip6zoneBtS, validateBuffer: ip6zoneVB)
- Source Edit
TranscoderOnion = (stringToBuffer: onionStB, bufferToString: onionBtS, validateBuffer: onionVB)
- Source Edit
TranscoderOnion3 = (stringToBuffer: onion3StB, bufferToString: onion3BtS, validateBuffer: onion3VB)
- Source Edit
TranscoderP2P = (stringToBuffer: p2pStB, bufferToString: p2pBtS, validateBuffer: p2pVB)
- Source Edit
TranscoderPort = (stringToBuffer: portStB, bufferToString: portBtS, validateBuffer: portVB)
- Source Edit
TranscoderUnix = (stringToBuffer: unixStB, bufferToString: unixBtS, validateBuffer: unixVB)
- Source Edit
UDP = (operator: Or, args: [(operator: And, args: [(operator: Or, args: [ (operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 273)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 273)], value: 0)], value: 0)
- Source Edit
Unreliable = (operator: Or, args: [(operator: Or, args: [(operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 273)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 273)], value: 0)], value: 0)], value: 0)
- Source Edit
UTP = (operator: And, args: [(operator: Or, args: [(operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 273)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 273)], value: 0)], value: 0), (operator: Eq, args: [], value: 302)], value: 0)
- Source Edit
WebRTCDirect = (operator: Or, args: [(operator: And, args: [(operator: Or, args: [( operator: And, args: [(operator: Or, args: [(operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 6)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 6)], value: 0)], value: 0), (operator: Eq, args: [], value: 480)], value: 0), ( operator: And, args: [(operator: Or, args: [ (operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 480)], value: 0), (operator: And, args: [(operator: Or, args: [ (operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 480)], value: 0)], value: 0), (operator: Eq, args: [], value: 276)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: And, args: [(operator: Or, args: [( operator: And, args: [(operator: Or, args: [ (operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 6)], value: 0), (operator: And, args: [(operator: Or, args: [ (operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 6)], value: 0)], value: 0), (operator: Eq, args: [], value: 443)], value: 0), (operator: And, args: [(operator: Or, args: [ (operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 443)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 443)], value: 0)], value: 0), (operator: Eq, args: [], value: 276)], value: 0)], value: 0)
- Source Edit
WebSockets = (operator: Or, args: [(operator: And, args: [(operator: Or, args: [( operator: And, args: [(operator: Or, args: [ (operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 6)], value: 0), (operator: And, args: [(operator: Or, args: [ (operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 6)], value: 0)], value: 0), (operator: Eq, args: [], value: 477)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: And, args: [(operator: Or, args: [ (operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 6)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 6)], value: 0)], value: 0), (operator: Eq, args: [], value: 478)], value: 0)], value: 0)
- Source Edit
WS = (operator: And, args: [(operator: Or, args: [(operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 6)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 6)], value: 0)], value: 0), (operator: Eq, args: [], value: 477)], value: 0)
- Source Edit
WSS = (operator: And, args: [(operator: Or, args: [(operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 53), (operator: Eq, args: [], value: 54), (operator: Eq, args: [], value: 55), (operator: Eq, args: [], value: 56)], value: 0), (operator: Eq, args: [], value: 6)], value: 0), (operator: And, args: [( operator: Or, args: [(operator: Eq, args: [], value: 4), (operator: Eq, args: [], value: 41)], value: 0), (operator: Eq, args: [], value: 6)], value: 0)], value: 0), (operator: Eq, args: [], value: 478)], value: 0)
- Source Edit
Procs
proc `$`(pat: MaPattern): string {....raises: [], public, ...tags: [].}
- Return pattern pat as string. Source Edit
proc `$`(value: MultiAddress): string {....raises: [Defect], raises: [], public, ...tags: [RootEffect].}
- Return string representation of MultiAddress value. Source Edit
proc `&=`(m1: var MultiAddress; m2: MultiAddress) {....raises: [Defect, LPError], raises: [], public, ...tags: [RootEffect].}
-
Concatenates two addresses m1 and m2.
This procedure performs validation of concatenated result and can raise exception on error.
Source Edit proc `&`(m1, m2: MultiAddress): MultiAddress {....raises: [Defect, LPError], raises: [], public, ...tags: [RootEffect].}
-
Concatenates two addresses m1 and m2, and returns result.
This procedure performs validation of concatenated result and can raise exception on error.
Source Edit proc `==`(m1: var MultiAddress; m2: MultiAddress): bool {....raises: [], public, ...tags: [].}
- Check of two MultiAddress are equal Source Edit
proc `[]`(ma: MultiAddress; codec: MultiCodec): MaResult[MultiAddress] {.inline, ...raises: [], public, ...tags: [].}
- Returns partial MultiAddress with MultiCodec codec and present in MultiAddress ma. Source Edit
proc `[]`(ma: MultiAddress; i: int | BackwardsIndex): MaResult[MultiAddress] {. inline, ...raises: [], public.}
- Returns part with index i of MultiAddress ma. Source Edit
proc `[]`(ma: MultiAddress; slice: HSlice): MaResult[MultiAddress] {.inline, ...raises: [], public.}
- Returns parts with slice slice of MultiAddress ma. Source Edit
proc append(m1: var MultiAddress; m2: MultiAddress): MaResult[void] {. ...raises: [], public, ...tags: [RootEffect].}
- Source Edit
proc bytes(value: MultiAddress): seq[byte] {....raises: [], public, ...tags: [].}
- Source Edit
proc concat(m1, m2: MultiAddress): MaResult[MultiAddress] {....raises: [], public, ...tags: [RootEffect].}
- Source Edit
proc contains(ma: MultiAddress; codec: MultiCodec): MaResult[bool] {.inline, ...raises: [], public, ...tags: [].}
- Returns true, if address with MultiCodec codec present in MultiAddress ma. Source Edit
proc encode(mbtype: typedesc[MultiBase]; encoding: string; ma: MultiAddress): string {. inline, ...raises: [], public.}
- Get MultiBase encoded representation of ma using encoding encoding. Source Edit
proc getField(pb: ProtoBuffer; field: int; value: var MultiAddress): ProtoResult[ bool] {.inline, ...raises: [], public, ...tags: [RootEffect].}
- Source Edit
proc getRepeatedField(pb: ProtoBuffer; field: int; value: var seq[MultiAddress]): ProtoResult[ bool] {.inline, ...raises: [], public, ...tags: [RootEffect].}
- Source Edit
proc hash(a: MultiAddress): Hash {....raises: [], public, ...tags: [].}
- Source Edit
proc hex(value: MultiAddress): string {....raises: [], public, ...tags: [].}
- Return hexadecimal string representation of MultiAddress value. Source Edit
proc init(mtype: typedesc[MultiAddress]): MultiAddress {....raises: [], public.}
- Initialize empty MultiAddress. Source Edit
proc init(mtype: typedesc[MultiAddress]; address: TransportAddress; protocol = IPPROTO_TCP): MaResult[MultiAddress] {....raises: [], public.}
- Initialize MultiAddress using chronos.TransportAddress (IPv4/IPv6/Unix) and protocol information (UDP/TCP). Source Edit
proc init(mtype: typedesc[MultiAddress]; address: ValidIpAddress; protocol: IpTransportProtocol; port: Port): MultiAddress {....raises: [], public.}
- Source Edit
proc init(mtype: typedesc[MultiAddress]; data: openArray[byte]): MaResult[ MultiAddress] {....raises: [], public.}
- Initialize MultiAddress with array of bytes data. Source Edit
proc init(mtype: typedesc[MultiAddress]; protocol: MultiCodec; value: openArray[byte] = []): MaResult[MultiAddress] {....raises: [], public.}
- Initialize MultiAddress object from protocol id protocol and array of bytes value. Source Edit
proc init(mtype: typedesc[MultiAddress]; protocol: MultiCodec; value: int): MaResult[ MultiAddress] {....raises: [], public.}
- Initialize MultiAddress object from protocol id protocol and integer value. This procedure can be used to instantiate tcp, udp, dccp and sctp MultiAddresses. Source Edit
proc init(mtype: typedesc[MultiAddress]; protocol: MultiCodec; value: PeerId): MaResult[ MultiAddress] {.inline, ...raises: [], public.}
- Initialize MultiAddress object from protocol id protocol and peer id value. Source Edit
proc init(mtype: typedesc[MultiAddress]; value: string): MaResult[MultiAddress] {. ...raises: [], public.}
- Initialize MultiAddress object from string representation value. Source Edit
proc isEmpty(ma: MultiAddress): bool {....raises: [], public, ...tags: [].}
- Returns true, if MultiAddress ma is empty or non initialized. Source Edit
proc len(ma: MultiAddress): MaResult[int] {....raises: [], public, ...tags: [].}
- Source Edit
proc mapAnd(args: varargs[MaPattern]): MaPattern {....raises: [], public, ...tags: [].}
- And operator for pattern Source Edit
proc mapEq(codec: string): MaPattern {....raises: [], public, ...tags: [].}
- Equal operator for pattern Source Edit
proc mapOr(args: varargs[MaPattern]): MaPattern {....raises: [], public, ...tags: [].}
- Or operator for pattern Source Edit
proc match(pat: MaPattern; address: MultiAddress): bool {....raises: [], public, ...tags: [].}
- Match full address using pattern pat and return true if address satisfies pattern. Source Edit
proc matchPartial(pat: MaPattern; address: MultiAddress): bool {....raises: [], public, ...tags: [].}
- Match prefix part of address using pattern pat and return true if address starts with pattern. Source Edit
proc protoAddress(ma: MultiAddress): MaResult[seq[byte]] {....raises: [], public, ...tags: [].}
-
Returns MultiAddress ma protocol address binary blob.
If current MultiAddress do not have argument value, then result array will be empty.
Source Edit proc protoArgument(ma: MultiAddress): MaResult[seq[byte]] {....raises: [], public, ...tags: [].}
-
Returns MultiAddress ma protocol address binary blob.
If current MultiAddress do not have argument value, then result array will be empty.
Source Edit proc protoArgument(ma: MultiAddress; value: var openArray[byte]): MaResult[int] {. ...raises: [], public, ...tags: [].}
-
Returns MultiAddress ma protocol argument value.
If current MultiAddress do not have argument value, then result will be 0.
Source Edit proc protoCode(ma: MultiAddress): MaResult[MultiCodec] {....raises: [], public, ...tags: [].}
- Returns MultiAddress ma protocol code. Source Edit
proc protocols(value: MultiAddress): MaResult[seq[MultiCodec]] {....raises: [], public, ...tags: [].}
- Returns list of protocol codecs inside of MultiAddress value. Source Edit
proc protoName(ma: MultiAddress): MaResult[string] {....raises: [], public, ...tags: [].}
- Returns MultiAddress ma protocol name. Source Edit
proc toString(value: MultiAddress): MaResult[string] {....raises: [], public, ...tags: [RootEffect].}
- Return string representation of MultiAddress value. Source Edit
proc validate(ma: MultiAddress): bool {....raises: [], public, ...tags: [RootEffect].}
- Returns true if MultiAddress ma is valid. Source Edit
proc write(pb: var ProtoBuffer; field: int; value: MultiAddress) {.inline, ...raises: [], public, ...tags: [].}
- Source Edit
proc write(vb: var VBuffer; ma: MultiAddress) {.inline, ...raises: [], public, ...tags: [].}
- Write MultiAddress value ma to buffer vb. Source Edit
Iterators
iterator items(ma: MultiAddress): MaResult[MultiAddress] {....raises: [], public, ...tags: [].}
- Iterates over all addresses inside of MultiAddress ma. Source Edit
Exports
-
getField, checkFieldNumber, getField, getRequiredField, shortLog, ProtoHeader, finish, write, getField, public, shortLog, ProtoFlags, isEmpty, ProtoScalar, getProtoHeader, getRepeatedField, writePacked, getLen, ProtoFieldKind, ProtoError, initProtoBuffer, write, getProtoHeader, getField, vsizeof, initProtoBuffer, getPtr, ProtoField, getRequiredRepeatedField, initProtoBuffer, getRepeatedField, ProtoBuffer, isEnough, write, ProtoResult, getPackedRepeatedField, toOpenArray, SupportedWireTypes, len, $, initVBuffer, writeSeq, isEnough, isEmpty, high, readArray, initVBuffer, readSeq, writeLPVarint, readVarint, writePBVarint, writeArray, writeVarint, peekSeq, peekVarint, initVBuffer, finish, VBuffer, peekArray, shortLog, shortLog, public