libp2p/utils/conversion

Search:
Group by:
Source   Edit  

Procs

func ipv4ToString(bytes: openArray[byte]): string {....raises: [ValueError],
    raises: [], tags: [], forbids: [].}
Renders 4 network-order bytes as a dotted-decimal IPv4 address, e.g. "1.2.3.4". Raises ValueError if bytes is not 4 bytes long. Source   Edit  
func ipv6ToString(bytes: openArray[byte]): string {....raises: [ValueError],
    raises: [], tags: [], forbids: [].}
Renders 16 network-order bytes as a compressed IPv6 address, e.g. "2606:4700:10::6816:19b5". Raises ValueError if bytes is not 16 bytes long. Source   Edit  
proc safeConvert[T: SomeInteger](value: SomeOrdinal): T {....raises: [].}
Source   Edit