Expand description
The API for the Essential block builder.
Find the available endpoints under the endpoint
module.
To serve the builder API, construct a router
, a TcpListener
and call serve
.
Modules§
- endpoint
- Provides a small module for each endpoint with associated
PATH
andhandler
.
Structs§
- Serve
Conn Error - An error occurred while attempting to serve a connection.
- State
- State provided to the endpoints when serving connections.
Enums§
- Serve
Next Conn Error - An error occurred while attempting to serve a new connection.
Constants§
- DEFAULT_
CONNECTION_ LIMIT - The default value used by
essential-builder-cli
for the maximum number of TCP stream connections to maintain at once.
Functions§
- cors_
layer - The default CORS layer.
- next_
conn - Accept and return the next TCP stream connection.
- router
- Construct the endpoint router with the builder
endpoint
s, CORS layer and DB connection pool as state. - serve
- Continuously serve the Builder API using the given
router
and TCPlistener
. - serve_
conn - Serve a newly accepted TCP stream.
- serve_
next_ conn - Accept and serve the next connection.
- with_
endpoints - Add the builder API
endpoint
s to the givenrouter
.