[][src]Crate wasm_service

Base support for wasm service using Confluence Workers

Modules

logging

Re-import [crate:service-logging]

Structs

Context

Context manages the information flow for an incoming http Request, the application handler, and the generated http Response. It holds a buffer for log messages, and a hook for deferred tasks to be processed after the Response is returned.

Request

Incoming HTTP request (to Worker). This is not for outgoing requests - for those, use reqwest library

Response

Response for replying to http requests. The Response is created/accessed from ctx.response() and has a builder-like api.

Enums

Error

Errors generated by this crate

Method

HTTP Method

Traits

Handler

Trait that defines app/service's request handler and router

Runnable

Runnable trait for deferred tasks

Functions

service_request

Entrypoint for wasm-service. Converts parameters from javascript, invokes app-specific handler, and converts response to javascript. Also sends logs to logger and runs deferred taskss