Body.Any #
A type-erased body backed by closures. Implements Http.Body and can be constructed from any
type that also implements Http.Body. Used as the default handler response body type.
A type-erased body handle. Operations are stored as closures, making it open to any body type
that implements Http.Body.
- recv : Async.Async (Option Chunk)
Receives the next body chunk. Returns
noneat end-of-stream. - close : Async.Async Unit
Closes the body stream.
- isClosed : Async.Async Bool
Returns
truewhen the body stream is closed. - recvSelector : Async.Selector (Option Chunk)
Selector that resolves when a chunk is available or EOF is reached.
- tryRecv : Async.Async (Option (Option Chunk))
Non-blocking receive attempt. Returns
noneif no chunk is immediately available,some (some chunk)when a chunk is ready, orsome noneat end-of-stream. - getKnownSize : Async.Async (Option Length)
Returns the declared size.
- setKnownSize : Option Length → Async.Async Unit
Sets the size of the body.
Instances For
@[implicit_reducible]
Equations
- One or more equations did not get rendered due to their size.