API reference Dodo 0.1.4

std/web/server

Public declarations, types, methods, and source contracts for std/web/server.

On this page

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/server"

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
connection std/http/connection server.dodo
http std/http server.dodo
io std/io server.dodo
web std/web server.dodo

Step

Enum · Source

pub enum Step {
    Pending, Progress, RequestComplete, Upgrade
}

EventKind

Enum · Source

pub enum EventKind {
    Head, Body, Complete, Failure
}

Event

Struct · Source

pub struct Event {
    pub kind: EventKind
    pub request_id: u64
    pub bytes: usize
    pub status: u16
}

NoObserver

Struct · Source

pub struct NoObserver {

}

NoObserver.event

Function · Source

pub fn event(&mut self, event: &Event)

Application

Struct · Source

Application callbacks are synchronous structural methods: head(&mut self, &mut web.Context) -> void!web.Error poll_write(&mut self, &[u8]) -> io.Poll!io.Error (streaming request body sink) complete(&mut self, &mut connection.Connection) -> void!connection.Error Complete may queue a streaming response; application drives poll_flush, send_body, finish_body. Returning does not imply successful delivery.

pub struct Application {
    // Private implementation fields omitted.
}

Application.new

Function · Source

pub fn new(routes: &[web.Route], path: &mut[u8]) -> Application!web.Error from(routes, path)

Application.step

Function · Source

pub fn step<S, H, O>(&mut self, driver: &mut connection.Connection, stream: &mut S, handler: &mut H, observer: &mut O) -> Step!web.Error

Type to search all documentation.

Keyboard shortcuts

Search documentation
Ctrl K or /
Move through results
↑ ↓
Open selected result
Enter
Close a dialog
Esc
Show these shortcuts
?