Crate wasm_framework[−][src]
Base support for wasm service using Confluence Workers
Structs
Body | The body of a |
Context | Context manages the information flow for an incoming HTTP [ |
HandlerReturn | Generic page error return - doesn’t require ctx |
HttpDate | Time in UTC, with conversions to/from u64 and rfc2822 |
Request | Incoming HTTP request (to Worker). |
Response | Worker response for HTTP requests.
The Response is created/accessed from |
RunContext | Logging support for deferred tasks |
ServiceConfig | Configuration parameters for service Parameter E is your crate’s error type |
Url | re-export url::Url |
Enums
Error | Errors generated by this crate It’s not necessary for users of wasm_service to import this, because Error implements trait std::error::Error. |
Method | HTTP Method |
Traits
Handler | Trait that defines app/service’s request handler and router See rustwasm-service-template for a more complete example |
Runnable | Runnable trait for deferred tasks Deferred tasks are often useful for logging and analytics. |
Functions
default_not_found_handler | Default implementation of not-found handler. Sets status to 404 and returns a short message “Not Found” |
handler_return | Generate handler return “error” |
media_type | Determines the Media Type (aka MIME) for file based on extension. If type is not known (based on implemented list), returns None. |
service_request | Entrypoint for wasm-service. Converts parameters from javascript into Request,
invokes app-specific Handler, and converts |