diff options
author | Guillaume Pasquet <dev@etenil.net> | 2022-02-15 14:01:15 +0000 |
---|---|---|
committer | Guillaume Pasquet <dev@etenil.net> | 2022-02-15 14:01:15 +0000 |
commit | 15e40bf3d028b383afbf7251910a121807e0d1b1 (patch) | |
tree | f756b69731198d24addf6ea77f34241b57b61e82 /src/barbfile.rs | |
parent | 77f9fa4ddb2032309c19508a11de0caa3c155af1 (diff) |
Add headers support
Diffstat (limited to 'src/barbfile.rs')
-rw-r--r-- | src/barbfile.rs | 12 |
1 files changed, 11 insertions, 1 deletions
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, |