Commit Graph

37 Commits

Author SHA1 Message Date
Emii Tatsuo 244fd25112
Completely reworked request handling to be able to serve SCGI
Multi ~~track~~ protocol ~~drifting~~ abstraction!!
2020-12-01 02:31:08 -05:00
Emii Tatsuo 86ed240761
Remove dependancy on `mime` when `serve_dir` is off 2020-11-30 21:26:25 -05:00
Emii Tatsuo e7cbbd7d91
Merge branch 'accept-string-docs' into kochab 2020-11-28 14:51:02 -05:00
Emii Tatsuo 9c999609ef
Accept strings in Document methods
A lot of the time users are using the document, it's in order to dynamically generate a page.  However, when dynamically generating a page, most of the time you're working with String's, not just &str's.  Currently, many Document methods only take an &str, which means that each time you call a method with something like the output from `format!()`, you need to add a `.as_str()`, which adds just a little bit of clutter.

This change makes it so that Document methods that previously took an `&str` can now take an `impl AsRef<str>`, which allows users to pass either an `&str` or a `String`.
2020-11-28 14:47:39 -05:00
Emii Tatsuo 67fe997eee
Merge branch 'fix-stable-build' into kochab 2020-11-27 22:23:55 -05:00
Emii Tatsuo 71a79ad6ff
Fix stable build 2020-11-27 22:20:55 -05:00
Emii Tatsuo 47c6fae79f
Expose user manager in request 2020-11-26 21:04:02 -05:00
Emii Tatsuo 1766ab4c9c
Merge `Builder` and `Server` in the public API into one concept 2020-11-25 15:52:44 -05:00
Emii Tatsuo b69aba139f
Rebrand as kochab
I spent /so/ long looking for that figlet font.
    __              __          __
   / /______  _____/ /_  ____ _/ /_
  / //_/ __ \/ ___/ __ \/ __ `/ __ \
 / ,< / /_/ / /__/ / / / /_/ / /_/ /
/_/|_|\____/\___/_/ /_/\__,_/_.___/
2020-11-25 00:42:09 -05:00
Emi Tatsuo 16721a7321
Merge several pending changes into a virtual master
Octopus merges are just a cheap trick to make weak branches stronger
2020-11-24 23:04:26 -05:00
Emi Tatsuo c3d7381860
Added a static handler type. Impl AsRef<Body> for Response
im so tired i havent slept enough in so long but also i havent done any productive work like do you think im using this project as an excuse or like a bad coping mechanism for my mental health or something like that cause thats what its starting to feel like
2020-11-23 23:34:11 -05:00
panicbit eebf7119fb
Merge branch 'master' into routes 2020-11-22 21:00:33 +01:00
Emi Tatsuo a9b347a8c9
Merge branch 'rework-success' into user-management 2020-11-21 17:34:08 -05:00
Emi Tatsuo 115d0aa120
Merge branch 'doc-into-req' into user-management 2020-11-21 17:19:49 -05:00
Emi Tatsuo cd7af1025a
Cleanup typos in routes docs
I should really use spellcheck more often
2020-11-20 23:51:22 -05:00
Emi Tatsuo e678e45b78
Merge branch 'routes' into user-management 2020-11-20 21:53:00 -05:00
Emi Tatsuo 5254c17e36
Rework Request::success methods 2020-11-20 14:18:11 -05:00
Emi Tatsuo 59e3222ce8
Add trailing segments to request 2020-11-20 13:22:34 -05:00
Emi Tatsuo 3296d00ec3
Add From<Borrow<Document>> to Response
This allows users to call &mut Document.into() in order to create a response, so that you
can do it right in the middle of one of those builder call chain thingies
2020-11-20 09:51:37 -05:00
Emi Tatsuo 435330b415
Made Request::document a bit more generic
Also how did I not know about the Borrow trait until now???
2020-11-20 09:40:57 -05:00
Emi Tatsuo 0bcce9fd6f
Appease clippy
Please my compiler is so angry ;-;
2020-11-19 18:03:10 -05:00
Emi Tatsuo 4996ae99d2
Merge remote-tracking branch 'upstream/master' into user-management 2020-11-19 14:41:18 -05:00
Emi Tatsuo 3da18ca530
Reduced tokio featureset 2020-11-19 10:21:32 -05:00
Emi Tatsuo 753ecf708d
Isolate directory serving methods behind feature, incl mime_guess. Remove itertools 2020-11-19 02:49:41 -05:00
panicbit f2b27665c2 correctly ignore doctest 2020-11-18 23:01:10 +01:00
panicbit 931c3fbbc2 add temporary redirects and bad requests 2020-11-18 21:26:27 +01:00
Emi Tatsuo 6a78b2f31a
Added Response::success_with_body 2020-11-17 21:41:18 -05:00
Emi Tatsuo 0e2f8d5f62
Added user management API [WIP] 2020-11-16 01:13:16 -05:00
panicbit add2f30ca6 remove unused function 2020-11-15 21:42:13 +01:00
panicbit bbeb697bb1 complete document documentation 2020-11-15 21:40:16 +01:00
panicbit ec6a0af782 keep document internals private 2020-11-15 21:17:22 +01:00
panicbit ae803a55d2 do not escape heading text 2020-11-15 21:14:53 +01:00
panicbit 45c808d0d0 document more Document methods 2020-11-15 21:14:41 +01:00
panicbit 46077739b3 document some Document methods 2020-11-15 07:01:38 +01:00
panicbit 0425bf2cf3 add Cowy util trait 2020-11-14 22:46:29 +01:00
panicbit 0c05d6d162 implement document API 2020-11-14 09:55:21 +01:00
panicbit 28162bde5c move split types module into submodules 2020-11-14 04:43:29 +01:00