Library guide · API index and notation
This page is generated from the bundled library in this checkout. Signatures and adjacent source comments are reproduced below; the linked guide explains usage, storage, failures, and platform support.
import "std/web/response"
Names used in signatures
Unqualified names denote this package’s types (including other source files in the same package), language built-ins, or generic parameters such as T. Qualified names use the import aliases below. These aliases belong to the library source; import a dependency yourself to use its alias in your program.
| Alias | Package | Source file |
|---|---|---|
http |
std/http |
response.dodo |
Builder
Struct · Source
A response builder borrows header slots, never allocates. Fields borrow the caller’s strings until serialization; streaming bodies are framing metadata.
pub struct Builder {
// Private implementation fields omitted.
}
Builder.new
Function · Source
pub fn new(status: u16, headers: &mut[http.Header]) -> Builder!http.Error from(headers)
Builder.include
Function · Source
Header storage can be preinitialized with borrowed values. Selecting a count avoids pretending mutation can extend the storage borrow lifetime.
pub fn include(&mut self, count: usize) -> void!http.Error
Builder.build
Function · Source
pub fn build(&self, body: http.Body) -> http.Response from(self)