libp2p/stream/streamseq

Search:
Group by:
Source   Edit  

Types

StreamSeq = object
  
Source   Edit  

Procs

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