Struct spacegate_kernel::plugins::context::SgCtxRequest
source · pub struct SgCtxRequest { /* private fields */ }Implementations§
source§impl SgCtxRequest
impl SgCtxRequest
pub fn new( method: Method, uri: Uri, version: Version, headers: HeaderMap<HeaderValue>, body: Option<Body>, remote_addr: SocketAddr ) -> Self
pub fn get_req_method(&mut self) -> &Method
pub fn set_req_method(&mut self, method: Method)
pub fn get_req_method_raw(&self) -> &Method
pub fn get_req_uri(&mut self) -> &Uri
pub fn set_req_uri(&mut self, uri: Uri)
pub fn get_req_uri_raw(&self) -> &Uri
pub fn get_req_version(&mut self) -> &Version
pub fn set_req_version(&mut self, version: Version)
pub fn get_req_version_raw(&self) -> &Version
pub fn get_req_headers(&mut self) -> &HeaderMap<HeaderValue>
pub fn get_req_headers_mut(&mut self) -> &mut HeaderMap<HeaderValue>
pub fn set_req_headers(&mut self, req_headers: HeaderMap<HeaderValue>)
pub fn set_req_header(&mut self, key: &str, value: &str) -> TardisResult<()>
pub fn get_req_headers_raw(&self) -> &HeaderMap<HeaderValue>
pub async fn pop_req_body(&mut self) -> TardisResult<Option<Vec<u8>>>
pub fn set_req_body(&mut self, body: Vec<u8>) -> TardisResult<()>
pub fn pop_req_body_raw(&mut self) -> TardisResult<Option<Body>>
pub fn get_req_remote_addr(&self) -> &SocketAddr
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SgCtxRequest
impl Send for SgCtxRequest
impl Sync for SgCtxRequest
impl Unpin for SgCtxRequest
impl !UnwindSafe for SgCtxRequest
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more