From fdfc6c4123ecdb8d8e173a4661a0bcf7d7220a33 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sat, 26 Mar 2022 00:46:03 +0000 Subject: feat: working proof Forgot to commit this last night! --- src/response.rs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/response.rs (limited to 'src/response.rs') 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 . +// Copyright (C) 2022-2022 Fuwn +// +// 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 . +// +// Copyright (C) 2022-2022 Fuwn +// 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) + } +} -- cgit v1.2.3