diff options
| author | Fuwn <[email protected]> | 2022-03-26 09:43:42 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-03-26 09:43:42 +0000 |
| commit | a436ec3dee22fcf58d9ce1e7b6bbba7766aabd79 (patch) | |
| tree | a0826d014e317753cd580b9f0d56e8c523130e41 /src/response.rs | |
| parent | feat(response): temporary failure response (diff) | |
| download | windmark-a436ec3dee22fcf58d9ce1e7b6bbba7766aabd79.tar.xz windmark-a436ec3dee22fcf58d9ce1e7b6bbba7766aabd79.zip | |
feat(response): inputs
Diffstat (limited to 'src/response.rs')
| -rw-r--r-- | src/response.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/response.rs b/src/response.rs index 961cf79..cad2f1a 100644 --- a/src/response.rs +++ b/src/response.rs @@ -27,6 +27,8 @@ impl ToString for Header { } pub enum Response { + Input(String), + SensitiveInput(String), Success(String), NotFound(String), TemporaryFailure(String), @@ -38,6 +40,16 @@ pub(crate) fn to_value_set_status( status: &mut i32, ) -> String { match response { + Response::Input(value) => { + *status = 10; + + value + } + Response::SensitiveInput(value) => { + *status = 11; + + value + } Response::Success(value) => { *status = 20; |