Skip to content

Draft: refactor UIA flow into guard

mikoto requested to merge mikoto/grapevine-fork:uiaa-refactor into main

It turns out to be quite difficult to refactor UIA in a way that avoids introducing code into our handlers. IncomingRequest defines the associated type bound by a similarly named trait EndpointError, meaning that figuring out whether T::EndpointError = UiaaResponse requires the introduction of trait bounds.

It would be really, really useful to have the ability to define middleware functions that operate on Ar<Req> and Ra<Resp>, my findings seem to suggest that RumaHandler would require a wrapper type that defers the expansion from ruma_route to route somehow, to allow the introduction of a similar ruma_layer trait.

Merge request reports