diff options
author | gennyble <gen@nyble.dev> | 2025-03-27 11:50:53 -0500 |
---|---|---|
committer | gennyble <gen@nyble.dev> | 2025-03-27 11:50:53 -0500 |
commit | 1951dd60ff7110bda1b69bfb60065d3a116ebfee (patch) | |
tree | 61672d4b5d27456c1d1283d5259514190af112d5 | |
parent | ceb1047ed6bcd45f756bc2b9b0e41ddfdd694d56 (diff) | |
download | corgi-1951dd60ff7110bda1b69bfb60065d3a116ebfee.tar.gz corgi-1951dd60ff7110bda1b69bfb60065d3a116ebfee.zip |
add some getters
-rw-r--r-- | smalldog/src/lib.rs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/smalldog/src/lib.rs b/smalldog/src/lib.rs index adfe9c1..e139d30 100644 --- a/smalldog/src/lib.rs +++ b/smalldog/src/lib.rs @@ -1,11 +1,5 @@ use core::ffi; -use std::{ - borrow::Cow, - ffi::{CStr, CString}, - ptr, - str::FromStr, - sync::Mutex, -}; +use std::{borrow::Cow, ffi::CStr, ptr, sync::Mutex}; #[repr(C)] pub struct ModuleRequest<'req> { @@ -51,6 +45,14 @@ impl<'req> Request<'req> { None } + + pub fn headers(&self) -> &[(Cow<str>, Cow<str>)] { + &self.headers + } + + pub fn body(&self) -> Option<&[u8]> { + self.body + } } #[repr(C)] |