~/bend-docscommunity

air/chunk.bend checks

raw source on the hub · import 0x1efee7e6292e6267db2ca5c7e267456a/air/chunk.bend as Chunk

2 imports
import Base
import ./text.bend as Text

Types

type Decoder source · line 11 · raw

Data

Definitions

def size_line.fin source · line 19 · raw

@+rest:String -> @+acc:String -> @+used:U32 -> @+max:U32 -> @size:Maybe<&2, U32> -> Decoder

def size_line source · line 28 · raw

@+buf:String -> @acc:String -> @used:U32 -> @max:U32 -> @split:Maybe<&2, 0x1efee7e6292e6267db2ca5c7e267456a/air/text.Two> -> Decoder

A size line is hex digits, then optional ;extensions, then CRLF.

def size source · line 36 · raw

@+buf:String -> @acc:String -> @used:U32 -> @max:U32 -> Decoder

def data.crlf source · line 39 · raw

@buf:String -> @acc:String -> @used:U32 -> @n:U32 -> @data:String -> @rest:String -> Decoder

def data.fin source · line 50 · raw

@buf:String -> @acc:String -> @used:U32 -> @n:U32 -> @take:0x1efee7e6292e6267db2ca5c7e267456a/air/text.Take -> Decoder

def data source · line 59 · raw

@+buf:String -> @acc:String -> @used:U32 -> @+n:U32 -> Decoder

def trail.fin source · line 62 · raw

@rest:String -> @acc:String -> @blank:Bool -> Decoder

def trail source · line 70 · raw

@+buf:String -> @acc:String -> @split:Maybe<&2, 0x1efee7e6292e6267db2ca5c7e267456a/air/text.Two> -> Decoder

Trailer lines are read and ignored; the empty line ends the body.

def trail_at source · line 78 · raw

@+buf:String -> @acc:String -> Decoder

def drain source · line 82 · raw

@fuel:Nat -> @+max:U32 -> @c:Decoder -> Decoder

Decodes as far as the input allows, or until fuel runs out.

def feed source · line 104 · raw

@c:Decoder -> @data:String -> Decoder

Appends fresh input and unwraps a waiting state so it can be drained.