From 15e40bf3d028b383afbf7251910a121807e0d1b1 Mon Sep 17 00:00:00 2001 From: Guillaume Pasquet Date: Tue, 15 Feb 2022 14:01:15 +0000 Subject: Add headers support --- src/barbfile.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/barbfile.rs') diff --git a/src/barbfile.rs b/src/barbfile.rs index 4d304e2..39e4485 100644 --- a/src/barbfile.rs +++ b/src/barbfile.rs @@ -59,7 +59,7 @@ impl Method { } #[derive(Debug)] -struct Header { +pub struct Header { name: String, value: String, } @@ -70,6 +70,16 @@ impl fmt::Display for Header { } } +impl Header { + pub fn name(&self) -> &String { + &self.name + } + + pub fn value(&self) -> &String { + &self.value + } +} + struct BarbHeader { pub method: Method, pub url: String, -- cgit v1.2.3