Struct actix_swagger::Answer [−][src]
pub struct Answer<'a, T> { /* fields omitted */ }
Expand description
Strict answer to complain with generated code by cargo-swagg
Implementations
impl<'a, T: Serialize> Answer<'a, T>
[src]
impl<'a, T: Serialize> Answer<'a, T>
[src]pub fn new(response: T) -> Answer<'a, T>
[src]
pub fn header<V>(self, key: String, value: V) -> Self where
V: IntoHeaderValue,
[src]
pub fn header<V>(self, key: String, value: V) -> Self where
V: IntoHeaderValue,
[src]Set header to answer
pub fn status(self, status: StatusCode) -> Self
[src]
pub fn status(self, status: StatusCode) -> Self
[src]Set status code
pub fn content_type(self, content_type: Option<ContentType>) -> Self
[src]
pub fn content_type(self, content_type: Option<ContentType>) -> Self
[src]Set content-type Content-Type changes serializer for answer
Trait Implementations
impl<'a, T: Serialize> Responder for Answer<'a, T>
[src]
impl<'a, T: Serialize> Responder for Answer<'a, T>
[src]fn respond_to(self, _: &HttpRequest) -> HttpResponse
[src]
fn respond_to(self, _: &HttpRequest) -> HttpResponse
[src]Convert self to HttpResponse
.
fn with_status(self, status: StatusCode) -> CustomResponder<Self>
[src]
fn with_status(self, status: StatusCode) -> CustomResponder<Self>
[src]Override a status code for a Responder. Read more
fn with_header<H>(self, header: H) -> CustomResponder<Self> where
H: IntoHeaderPair,
[src]
fn with_header<H>(self, header: H) -> CustomResponder<Self> where
H: IntoHeaderPair,
[src]Insert header to the final response. Read more
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for Answer<'a, T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T> Send for Answer<'a, T> where
T: Send,
T: Send,
impl<'a, T> Sync for Answer<'a, T> where
T: Sync,
T: Sync,
impl<'a, T> Unpin for Answer<'a, T> where
T: Unpin,
T: Unpin,
impl<'a, T> UnwindSafe for Answer<'a, T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,