Expand description
HTTP(S) server runtime for apimock.
§Responsibilities
- Listener binding and the accept loop (HTTP + HTTPS).
- Per-request dispatch (OPTIONS / middleware / rule sets / dyn_route).
- Compiling Rhai middlewares from paths recorded in config.
- Building
hyper::Responsevalues from a matchedRespond.
§What is deliberately not here
- Rule-set matching logic. That’s
apimock-routing. - Config parsing / validation. That’s
apimock-config. - Server restart policy. The brief is explicit (§7): a running
server does not restart itself. It may emit
ReloadHint; an external control layer decides what to do.
Re-exports§
pub use control::ReloadHint;pub use control::ServerControl;pub use control::ServerHandle;pub use control::ServerState;pub use error::ServerError;pub use error::ServerResult;pub use error::TlsKind;pub use middleware::LoadedMiddlewares;pub use middleware::MiddlewareHandler;pub use server::AppState;pub use server::Server;pub use server::service;
Modules§
- constant
- control
- Stage-1 control/introspection API for the server.
- dyn_
route - error
- Errors produced by server-level operations.
- http_
util - HTTP utilities used only by the server crate.
- json_
path_ util - Filesystem helpers for resolving URL paths onto JSON-compatible files.
- middleware
- Compiled Rhai middlewares.
- parsed_
request - Server-side helpers for
apimock_routing::ParsedRequest. - respond_
response - Turn a matched
Responddeclaration into an HTTP response. - respond_
util - response
- response_
handler - server
- HTTP(S) server runtime.
- tls
- types