Struct rocket4::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
sourceimpl<R> Clone for JavaScript<R>where
R: Clone,
impl<R> Clone for JavaScript<R>where
R: Clone,
sourcefn clone(&self) -> JavaScript<R>
fn clone(&self) -> JavaScript<R>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<R> Debug for JavaScript<R>where
R: Debug,
impl<R> Debug for JavaScript<R>where
R: Debug,
sourceimpl<R> PartialEq<JavaScript<R>> for JavaScript<R>where
R: PartialEq<R>,
impl<R> PartialEq<JavaScript<R>> for JavaScript<R>where
R: PartialEq<R>,
sourcefn eq(&self, other: &JavaScript<R>) -> bool
fn eq(&self, other: &JavaScript<R>) -> bool
sourceimpl<'r, R> Responder<'r> for JavaScript<R>where
R: Responder<'r>,
impl<'r, R> Responder<'r> for JavaScript<R>where
R: Responder<'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> 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> IntoCollection<T> for T
impl<T> IntoCollection<T> for T
fn into_collection<A>(self) -> SmallVec<A>where
A: Array<Item = T>,
fn into_collection<A>(self) -> SmallVec<A>where
A: Array<Item = T>,
Converts
self
into a collection.