Commit Graph

402 Commits

Author SHA1 Message Date
Wilson Birney 60a01a1c65 Emit sized body when file length is known in 'NamedFile'. 2017-12-14 18:46:37 +07:00
Sergio Benitez b744a58ce0 Use correct rustdoc 'html_root_url'.
Fixes #474.
2017-12-14 18:45:23 +07:00
Lukas Kalbertodt 5bf2e0c6be Remove incorrect statement in 'RawStr' docs. 2017-12-14 18:42:02 +07:00
Ian Létourneau 937c5fb031 Add a 'status::BadRequest' responder. 2017-12-14 18:41:03 +07:00
Tobias Stolzmann 0a0bfceaa8 Fix typo in 'Outcome' docs: 'users' -> 'Users'. 2017-12-14 18:40:18 +07:00
Sergio Benitez 6460be62c3 Use '#[repr(C)]' on 'str' wrappers to guarantee correct layout.
Closes #494.
2017-12-14 18:21:57 +07:00
Sergio Benitez 308dbd76a0 Remove use of now unneeded 'AsciiExt' trait. 2017-11-09 10:21:45 +01:00
Sergio Benitez 805b24e60a Use a 'BufReader' for file-based bodies. 2017-09-25 20:32:43 -07:00
Sergio Benitez 38895fce13 Don't print emojis when colors are disabled. 2017-09-25 20:32:43 -07:00
Joshua Rombauer 42f32351a8 Clarify 'on_request' Fairing documentation. 2017-09-25 20:32:43 -07:00
Sergio Benitez ef44fc9497 Move handler definitions to top of file. 2017-09-25 20:32:43 -07:00
Sergio Benitez 8faddc118a Add a 'Responder' impl for 'Vec<u8>'. 2017-09-25 20:32:43 -07:00
Sergio Benitez b5875cb10b Add a 'Binary' media type for 'application/octet-stream'. 2017-09-25 20:32:43 -07:00
Sergio Benitez ab519f2232 Document case-insensitivity of 'from_ext'. 2017-09-25 20:32:43 -07:00
Sergio Benitez 442b714dbb Document 'FromParam' impl for 'Cow<str>'. 2017-09-25 20:32:43 -07:00
Sergio Benitez 9e4e46fd12 Implement 'FromParam' for 'Cow<str>'. 2017-09-25 20:32:43 -07:00
Lukas Kalbertodt a6c5a7e31c Use 'debug_struct' to improve 'Config' 'Debug' impl.
Using the method `debug_struct()` of `fmt::Formatter` takes care of
the exact formatting for us. Additionally, it also handles the
"alternate" form of printing enabled with '#'. In the struct case it
prints the struct on multiple lines instead of just one.

This commit also changes the output slightly. Before, the field
`log_level` was printed with `log: {}`. This commit replaces "log"
with "log_level". Additionally, the value of `environment` is now
printed as a struct field instead of being combined with the struct
name.
2017-09-25 20:32:43 -07:00
David Hotham 303e23f720 Remove reliance on 'lookup_host'. 2017-09-25 20:32:43 -07:00
Ram 0d7c0ffd1b Implement 'From<Status>' for 'Failure'.
Resolves #399.
2017-09-25 20:32:43 -07:00
QuietMisdreavus 2a967fca15 Indent comments to prevent being commonmark code blocks. 2017-09-25 20:32:43 -07:00
Sergio Benitez 02554fe225 Only log nonempty fairing collections. 2017-09-25 20:32:43 -07:00
Sergio Benitez d82c2d30d0 Improve I/O and BadType config error messages. 2017-09-25 20:32:43 -07:00
Linus Heckemann b4517461cf Avoid sorting routes on every add. 2017-09-25 20:32:43 -07:00
Sergio Benitez 7ea05c3d3e Remove 'drop_types_in_const' feature: stabilized. 2017-09-25 20:32:42 -07:00
adrian5 8e28ecc1f1 Add missing comma in 'FromParam' docs. 2017-08-14 13:10:03 -07:00
Sergio Benitez 9e5db81d31 Fix example in 'Request::guard()' documentation.
Resolves #378.
2017-08-14 13:10:03 -07:00
Daiki Mizukami 8c2e435298 Add 'Box' conversion methods to 'UncasedStr'. 2017-08-14 13:10:03 -07:00
Sergio Benitez 721f6204ea Update lints for latest nightly, '2017-08-10'. 2017-08-11 09:14:54 -07:00
Sergio Benitez 9108e79fb9 Fix typo in 'Limits' docs: anf -> and. 2017-08-04 20:21:21 -07:00
Sergio Benitez 0b7d9f4602 Remove unused doc comments. 2017-08-02 17:48:00 -07:00
Ian Létourneau 84fe23a9fb Fix spelling of "corresponding" in 'status' docs. 2017-07-27 01:58:25 -04:00
Sergio Benitez b276e1d51f Enable ASCII escape sequences in Windows consoles. 2017-07-26 22:54:45 -04:00
Sergio Benitez 3abc813605 Use 'AtomicIsize', not 'Cell', in URI. 2017-07-21 17:00:38 -04:00
Christian Legnitto 362afdc445 Fix spelling of "instantiated" in rustdocs. 2017-07-18 09:35:37 -04:00
Flarp 69afb5c4a3 Fix typo in 'NotFound' docs: 404, not 400. 2017-07-17 14:10:52 -04:00
Tommy Ip ae406cf0ca Fix 'clusure' typo in fairings guide and ad_hoc.rs.
Fixes #348.
2017-07-15 00:36:41 -07:00
Stuart Hinson b3f41f248c Update 'Fairing' example to reflect doc's content. 2017-07-15 00:35:25 -07:00
Yong Wen Chua 10efcb1af9 Always implement 'Responder' with 'r instead of 'static. 2017-07-14 09:43:22 -07:00
Sergio Benitez 722959ee29 Use a parametric lifetime in 'Responder' example. 2017-07-14 09:42:33 -07:00
Sergio Benitez 897313730d Use TitleCase for all 'content::' struct names. 2017-07-12 15:21:45 -07:00
Sergio Benitez 65886c8c4e Rename 'contrib::JSON' to 'contrib::Json'. 2017-07-12 15:11:41 -07:00
Sergio Benitez 70bc97c322 Rename 'APIKey' in example docs to 'ApiKey'. 2017-07-12 14:53:08 -07:00
Sergio Benitez 85846c2af1 Use 'hyper_sync_rustls' for hyper/rustls interop. 2017-07-12 04:13:46 -07:00
Sergio Benitez 5a632a4d27 Always log a request's 'format' when available. 2017-07-11 04:35:05 -07:00
Sergio Benitez 6050eb5169 Update for 2017-07-09. 'associated_consts' is stable. 2017-07-09 22:00:01 -07:00
Sergio Benitez 90d85d3c06 Implement 'Fairing' for 'Arc<T>'. Fix various doc issues. 2017-07-06 20:48:25 -07:00
Sergio Benitez 58445be4ff Add 'LocalRequest' cookies as original. 2017-07-04 14:51:00 -07:00
Sergio Benitez 6df5564983 Fix 'IntoOutcome' implementations for 'Option' and 'Result'.
Fixes #334.
2017-07-04 14:05:16 -07:00
Sergio Benitez 462f1f9298 Add a 'status::NotFound' responder. 2017-07-04 02:43:00 -07:00
Sergio Benitez 436bd99376 Use a streamed 'Responder' body for 'File', as before. 2017-07-04 01:34:43 -07:00