Expand description
Essentials helper functions and types for application registration.
§Request Extractors
Data
: Application data itemThinData
: Cheap-to-clone application data itemReqData
: Request-local data itemPath
: URL path parameters / dynamic segmentsQuery
: URL query parametersHeader
: Typed headerJson
: JSON payloadForm
: URL-encoded payloadBytes
: Raw payload
§Responders
Structs§
- Bytes
- A cheaply cloneable and sliceable chunk of contiguous memory.
- Bytes
Mut - A unique reference to a contiguous slice of memory.
- Data
- Application data wrapper and extractor.
- Form
- URL encoded payload extractor and responder.
- Form
Config Form
extractor configuration.- Header
- Extract typed headers from the request.
- Html
- Semantic HTML responder.
- Json
- JSON extractor and responder.
- Json
Config Json
extractor configuration.- Path
- Extract typed data from request path segments.
- Path
Config - Path extractor configuration
- Payload
- Extract a request’s raw payload stream.
- Payload
Config - Configuration for request payloads.
- Query
- Extract typed information from the request’s query.
- Query
Config - Query extractor configuration.
- Readlines
- Stream that reads request line by line.
- Redirect
- An HTTP service for redirecting one path to another path or URL.
- ReqData
- Request-local data extractor.
- Service
Config - Enables parts of app configuration to be declared separately from the app itself. Helpful for modularizing large applications.
- Thin
Data - Application data wrapper and extractor for cheaply-cloned types.
- UrlEncoded
- Future that resolves to some
T
when parsed from a URL encoded payload.
Enums§
- Either
- Combines two extractor or responder types into a single type.
- Json
Body - Future that resolves to some
T
when parsed from a JSON payload.
Traits§
Functions§
- block
- Executes blocking function on a thread pool, returns future that resolves to result of the function execution.
- delete
- Creates a new route with
DELETE
method guard. - get
- Creates a new route with
GET
method guard. - head
- Creates a new route with
HEAD
method guard. - method
- Creates a new route with specified method guard.
- patch
- Creates a new route with
PATCH
method guard. - post
- Creates a new route with
POST
method guard. - put
- Creates a new route with
PUT
method guard. - redirect
- Create a relative or absolute redirect.
- resource
- Creates a new resource for a specific path.
- route
- Creates a new un-configured route.
- scope
- Creates scope for common path prefix.
- service
- Creates a raw service for a specific path.
- to
- Creates a new any-method route with handler.
- trace
- Creates a new route with
TRACE
method guard.