Struct spacegate_kernel::plugins::context::SgCtxResponse
source · pub struct SgCtxResponse { /* private fields */ }Implementations§
source§impl SgCtxResponse
impl SgCtxResponse
pub fn new() -> Self
pub fn is_resp_error(&self) -> bool
pub fn get_resp_status_code(&mut self) -> &StatusCode
pub fn set_resp_status_code(&mut self, status_code: StatusCode)
pub fn get_resp_status_code_raw(&self) -> &StatusCode
pub fn get_resp_headers(&mut self) -> &HeaderMap<HeaderValue>
pub fn get_resp_headers_mut(&mut self) -> &mut HeaderMap<HeaderValue>
pub fn set_resp_headers(&mut self, resp_headers: HeaderMap<HeaderValue>)
pub fn set_resp_header(&mut self, key: &str, value: &str) -> TardisResult<()>
pub fn remove_resp_header(&mut self, key: &str) -> TardisResult<()>
pub fn get_resp_headers_raw(&self) -> &HeaderMap<HeaderValue>
pub async fn pop_resp_body(&mut self) -> TardisResult<Option<Vec<u8>>>
pub fn set_resp_body(&mut self, body: Vec<u8>) -> TardisResult<()>
pub fn pop_resp_body_raw(&mut self) -> TardisResult<Option<Body>>
Trait Implementations§
source§impl Debug for SgCtxResponse
impl Debug for SgCtxResponse
Auto Trait Implementations§
impl !RefUnwindSafe for SgCtxResponse
impl Send for SgCtxResponse
impl Sync for SgCtxResponse
impl Unpin for SgCtxResponse
impl !UnwindSafe for SgCtxResponse
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