Struct rocket::response::content::JavaScript
source · pub struct JavaScript<R>(pub R);
Expand description
Override the Content-Type
of the response to
JavaScript
, or
application/javascript
.
Delegates the remainder of the response to the wrapped responder.
Tuple Fields§
§0: R
Trait Implementations§
source§impl<R: Clone> Clone for JavaScript<R>
impl<R: Clone> Clone for JavaScript<R>
source§fn clone(&self) -> JavaScript<R>
fn clone(&self) -> JavaScript<R>
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<R: Debug> Debug for JavaScript<R>
impl<R: Debug> Debug for JavaScript<R>
source§impl<R: PartialEq> PartialEq for JavaScript<R>
impl<R: PartialEq> PartialEq for JavaScript<R>
source§impl<'r, R: Responder<'r>> Responder<'r> for JavaScript<R>
impl<'r, R: Responder<'r>> Responder<'r> for JavaScript<R>
Sets the Content-Type of the response then delegates the remainder of the response to the wrapped responder.
impl<R> StructuralPartialEq for JavaScript<R>
Auto Trait Implementations§
impl<R> Freeze for JavaScript<R>where
R: Freeze,
impl<R> RefUnwindSafe for JavaScript<R>where
R: RefUnwindSafe,
impl<R> Send for JavaScript<R>where
R: Send,
impl<R> Sync for JavaScript<R>where
R: Sync,
impl<R> Unpin for JavaScript<R>where
R: Unpin,
impl<R> UnwindSafe for JavaScript<R>where
R: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)