Skip to main content

Module write_context

Module write_context 

Source
Expand description

Who is making a write, carried to the table’s lifecycle hooks.

A host (an API server handling a request, a desktop app acting for its user) wraps the work in WriteContext::scope; every write awaited inside it hands the context to its hooks through their context field. Vantage doesn’t interpret it: principal is whatever record the host identifies the actor with, and group ties together everything one request or action run caused.

Structs§

RequestContext
What the host saw of the request a write came in on. Built with RequestContext::new and the with_* builders. Debug shows cookie names only: their values are session credentials.
WriteContext
Built with WriteContext::new and the with_* builders, so a field added later (request data, say) doesn’t break existing hosts.

Enums§

Transport
The entry point a write came in through.

Constants§

REQUEST_HEADER_ALLOW_LIST
Headers a host may copy into a RequestContext. Lowercase names. The host enforces it: RequestContext::with_header stores whatever it is given.