libp2p/utility

Search:
Group by:
Source   Edit  

Procs

proc capLen[T](s: var seq[T]; length: Natural) {....raises: [].}
Source   Edit  
func shortLog(item: openArray[byte]): string {....raises: [], tags: [], forbids: [].}
Source   Edit  
func shortLog(item: string): string {....raises: [], tags: [], forbids: [].}
Source   Edit  

Macros

macro withValue[T](self: Opt[T] | Option[T]; value, body, body2: untyped): untyped {.
    ...raises: [].}
Source   Edit  

Templates

template compilesOr(a, b: untyped): untyped
Source   Edit  
template exceptionToAssert(body: untyped): untyped
Source   Edit  
template public() {.pragma.}
Source   Edit  
template safeConvert[T: SomeInteger; S: Ordinal](value: S): T
Converts value from S to T iff value is guaranteed to be preserved. Source   Edit  
template toOpt[T, E](self: Result[T, E]): Opt[T]
Source   Edit  
template valueOr[T](self: Option[T]; body: untyped): untyped
Source   Edit  
template withValue[T](self: Opt[T] | Option[T]; value, body: untyped): untyped
Source   Edit