Skip to content

Commit

Permalink
Document '&[u8]' form/data guard, limits.
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioBenitez committed Nov 1, 2023
1 parent f14f93a commit 1563718
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion core/lib/src/data/limits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ use crate::http::uncased::Uncased;
/// | `data-form` | 2MiB | [`Form`] | entire data-based form |
/// | `file` | 1MiB | [`TempFile`] | [`TempFile`] data guard or form field |
/// | `file/$ext` | _N/A_ | [`TempFile`] | file form field with extension `$ext` |
/// | `string` | 8KiB | [`String`] | data guard or data form field |
/// | `string` | 8KiB | [`String`] | data guard or form field |
/// | `string` | 8KiB | [`&str`] | data guard or form field |
/// | `bytes` | 8KiB | [`Vec<u8>`] | data guard |
/// | `bytes` | 8KiB | [`&[u8]`] | data guard or form field |
/// | `json` | 1MiB | [`Json`] | JSON data and form payloads |
/// | `msgpack` | 1MiB | [`MsgPack`] | MessagePack data and form payloads |
///
Expand Down
3 changes: 2 additions & 1 deletion core/lib/src/form/from_form.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,12 @@ use crate::http::uncased::AsUncased;
/// | _nonzero_ int | _inherit_ | **no default** | No | Yes | `NonZero{I,U}{size,8,16,32,64,128}` |
/// | float | _inherit_ | **no default** | No | Yes | `f{32,64}` |
/// | `&str` | _inherit_ | **no default** | Yes | Yes | Percent-decoded. Data limit `string` applies. |
/// | `&[u8]` | _inherit_ | **no default** | Yes | Yes | Raw bytes. Data limit `bytes` applies. |
/// | `String` | _inherit_ | **no default** | Yes | Yes | Exactly `&str`, but owned. Prefer `&str`. |
/// | IP Address | _inherit_ | **no default** | No | Yes | [`IpAddr`], [`Ipv4Addr`], [`Ipv6Addr`] |
/// | Socket Address | _inherit_ | **no default** | No | Yes | [`SocketAddr`], [`SocketAddrV4`], [`SocketAddrV6`] |
/// | [`TempFile`] | _inherit_ | **no default** | Yes | Yes | Data limits apply. See [`TempFile`]. |
/// | [`Capped<C>`] | _inherit_ | **no default** | Yes | Yes | `C` is `&str`, `String`, `&[u8]` or `TempFile`. |
/// | [`Capped<C>`] | _inherit_ | **no default** | Yes | Yes | `C` is `&str`, `String`, `&[u8]` or `TempFile`. |
/// | [`time::Date`] | _inherit_ | **no default** | No | Yes | `%F` (`YYYY-MM-DD`). HTML "date" input. |
/// | [`time::DateTime`] | _inherit_ | **no default** | No | Yes | `%FT%R` or `%FT%T` (`YYYY-MM-DDTHH:MM[:SS]`) |
/// | [`time::Time`] | _inherit_ | **no default** | No | Yes | `%R` or `%T` (`HH:MM[:SS]`) |
Expand Down

0 comments on commit 1563718

Please sign in to comment.