project_note
Clone
https://git.tahinli.com/Tahinli/project_note.git
0 watching0 forksRust3.6 MiBc49f5e7Tahinli1 month ago2 commits
| 1 | //! POST /format: formats a code block for the editor. The formatters run on a blocking |
| 2 | //! thread, and the answer is the formatted code as plain text. |
| 3 | |
| 4 | use Deserialize; |
| 5 | use |
| 6 | |
| 7 | |
| 8 | ; |
| 9 | |
| 10 | /// The most `code` the endpoint accepts, in bytes. |
| 11 | const MAX_CODE_BYTES: usize = 256 * 1024; |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | /// POST /format: the formatted code, or 422 with the reason it could not be formatted. |
| 22 | |
| 23 | pub async |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 |