def enc.part
bend-kit-multipart@0.3.0.0 · multipart.bend:259
import bend-kit-multipart@0.3.0.0/multipart.bend as Multipart
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
259
260
261def enc.part(acc: Result<&1, &1, String, List<&1, Bytes.Bytes>>, p: Part, +b: String, +delim: String) -> Result<&1, &1, String, List<&1, Bytes.Bytes>>:
262 match acc:
263 case Fail{e}:
264 Fail{e}
265 case Done{xs}:
266 Part{name, fname, +ct, body} = p
267 enc.body(enc.ctype.ok(ct), Bytes.find(body, delim), enc.head(b, name, fname, ct), xs)