diff options
| author | Fuwn <[email protected]> | 2022-03-26 00:46:03 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-03-26 03:12:32 +0000 |
| commit | fdfc6c4123ecdb8d8e173a4661a0bcf7d7220a33 (patch) | |
| tree | 447c5f99a973d9e69e5b3b490acad8c37e07b0c7 /src/response.rs | |
| parent | docs(cargo): add meta (diff) | |
| download | windmark-fdfc6c4123ecdb8d8e173a4661a0bcf7d7220a33.tar.xz windmark-fdfc6c4123ecdb8d8e173a4661a0bcf7d7220a33.zip | |
feat: working proof
Forgot to commit this last night!
Diffstat (limited to 'src/response.rs')
| -rw-r--r-- | src/response.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/response.rs b/src/response.rs new file mode 100644 index 0000000..ccec4bb --- /dev/null +++ b/src/response.rs @@ -0,0 +1,27 @@ +// This file is part of Windmark <https://github.com/gemrest/windmark>. +// Copyright (C) 2022-2022 Fuwn <[email protected]> +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +// +// Copyright (C) 2022-2022 Fuwn <[email protected]> +// SPDX-License-Identifier: GPL-3.0-only + +pub struct Header { + status: crate::status::Code, + meta: String, +} +impl ToString for Header { + fn to_string(&self) -> String { + format!("{} {}\r\n", self.status as u8, self.meta) + } +} |