pub struct Response { /* private fields */ }Expand description
响应处理
Implementations§
Source§impl Response
impl Response
pub fn new(config: Config, protocol: Protocol) -> Response
pub fn set_code(&mut self, code: usize) -> &mut Self
pub fn set_access_control_allow_origin(&mut self) -> &mut Self
pub fn set_cache_control(&mut self, max_age: i32) -> &mut Self
pub fn receipt(&mut self, content_type: &str, content: JsonValue) -> String
pub fn websocket(&mut self, key: String) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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