libp2p/stream/streamseq

    Dark Mode
Search:
Group by:
  Source   Edit

Types

StreamSeq = object
  buf: seq[byte]
  rpos: int
  wpos: int
  Source   Edit

Procs

func add(v: var StreamSeq; data: openArray[byte]) {....raises: [], tags: [].}
Add data - the equivalent of buf.prepare(n) = data; buf.commit(n)   Source   Edit
func assign(v: var StreamSeq; buf: openArray[byte]) {....raises: [], tags: [].}
  Source   Edit
func clear(v: var StreamSeq) {....raises: [], tags: [].}
  Source   Edit
func consume(v: var StreamSeq; n: int) {....raises: [], tags: [].}
Mark n bytes that were returned via data as consumed   Source   Edit
func consumeTo(v: var StreamSeq; buf: var openArray[byte]): int {....raises: [],
    tags: [].}
  Source   Edit

Templates

template commit(v: var StreamSeq; n: int)
Mark n bytes in the buffer returned by prepare as ready for reading   Source   Edit
template data(v: StreamSeq): openArray[byte]
  Source   Edit
template len(v: StreamSeq): int
  Source   Edit
template prepare(v: var StreamSeq; n: int): var openArray[byte]
Return a buffer that is at least n bytes long   Source   Edit
template toOpenArray(v: StreamSeq; b, e: int): openArray[byte]
  Source   Edit