Module rusqbin::models [] [src]

Various models and associated helpers and type aliases.

The models here use String instead of &str

  1. The Json serdes traits don't work well with &str (specifically decoding), and while we can use fascade/presentation models, that adds more code and more run-time conversion.
  2. The fact that these models need to go over threads (because they need to be used in the http server) make it annoying to deal with lifecycles (cloning might be an answer).
  3. String is easier to just store somewhere because you don't need to worry about lifecycle annotations

Having said that, it would be nice to have them use &str instead of String, if possible (_^ "

Structs

BinSummary

Summary of a Bin of requests.

Id

Id type for Request Bins. Wraps a String.

IdExtractor

Parses normal Strings into an Id according to the compiled Regex that it holds.

Request

A record of an HTTP request made to the server.