pub fn js(&mut self, js: impl Fn(&mut JsBuilder)) {
        let _ = self.headers_mut().insert(
            header::CONTENT_TYPE,
            HeaderValue::from_static("application/javascript"),
        );

        let mut builder = JsBuilder::new();

        js(&mut builder);

        self.set_body(builder.get_body());
    }
/// Wrapper around Response.set_body for the JS context type.
Wrapper around Response.set_body for the JS context type.
Wrapper around Response . set_body for the JS context type .
pub fn js(&mut self, js: impl Fn(&mut JsBuilder)) {
        let _ = self.headers_mut().insert(
            header::CONTENT_TYPE,
            HeaderValue::from_static("application/javascript"),
        );
        let mut builder = JsBuilder::new();
        js(&mut builder);
        self.set_body(builder.get_body());
    }
pub fn js ( & mut self , js : impl Fn ( & mut JsBuilder ) ) { let _ = self . headers_mut ( ) . insert ( header :: CONTENT_TYPE , HeaderValue :: from_static ( " " ) , ) ; let mut builder = JsBuilder :: new ( ) ; js ( & mut builder ) ; self . set_body ( builder . get_body ( ) ) ; }
Wrapper around Response.set_body for the JS context type.
Wrapper around Response . set_body for the JS context type .
&mut self
js
impl Fn(&mut JsBuilder)
&mut self
js
impl Fn(&mut JsBuilder)