Struct axum_extra::response::JavaScript
source · pub struct JavaScript<T>(pub T);
Expand description
A JavaScript response.
Will automatically get Content-Type: application/javascript; charset=utf-8
.
Tuple Fields§
§0: T
Trait Implementations§
source§impl<T: Clone> Clone for JavaScript<T>
impl<T: Clone> Clone for JavaScript<T>
source§fn clone(&self) -> JavaScript<T>
fn clone(&self) -> JavaScript<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T: Debug> Debug for JavaScript<T>
impl<T: Debug> Debug for JavaScript<T>
source§impl<T> From<T> for JavaScript<T>
impl<T> From<T> for JavaScript<T>
source§impl<T> IntoResponse for JavaScript<T>where
T: IntoResponse,
impl<T> IntoResponse for JavaScript<T>where T: IntoResponse,
source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.