Struct poem_openapi::payload::Html
source · [−]pub struct Html<T>(pub T);
Expand description
A UTF8 html payload.
Tuple Fields
0: T
Trait Implementations
The type of API extractor.
type ParamRawType = ()
type ParamRawType = ()
The raw parameter type for validators.
Returns MetaRequest
if this extractor is request object.
fn from_request<'life0, 'async_trait>(
request: &'a Request,
body: &'life0 mut RequestBody,
_param_opts: ExtractParamOptions<Self::ParamType>
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>> where
'a: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn from_request<'life0, 'async_trait>(
request: &'a Request,
body: &'life0 mut RequestBody,
_param_opts: ExtractParamOptions<Self::ParamType>
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>> where
'a: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Parse from the HTTP request.
If it is true
, it means that this parameter is required.
Returns name of security scheme if this extractor is security scheme.
Returns the location of the parameter if this extractor is parameter.
Returns the schema of the parameter if this extractor is parameter.
Returns a reference to the raw type of this parameter.
Register the schema contained in this response object to the registry.
If true, it means that the response object has a custom bad request handler. Read more
Convert poem::Error
to this response object.
Consume itself and return Response
.
fn with_header<K, V>(self, key: K, value: V) -> WithHeader<Self> where
K: TryInto<HeaderName>,
V: TryInto<HeaderValue>,
fn with_header<K, V>(self, key: K, value: V) -> WithHeader<Self> where
K: TryInto<HeaderName>,
V: TryInto<HeaderValue>,
Wrap an impl IntoResponse
to add a header. Read more
Wrap an impl IntoResponse
to set a status code. Read more
If it is true
, it means that this payload is required.
fn from_request<'life0, 'life1, 'async_trait>(
request: &'life0 Request,
body: &'life1 mut RequestBody
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn from_request<'life0, 'life1, 'async_trait>(
request: &'life0 Request,
body: &'life1 mut RequestBody
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Parse the payload object from the HTTP request.
The content type of this payload.
Gets schema reference of this payload.
Auto Trait Implementations
impl<T> RefUnwindSafe for Html<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Html<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Consumes this value returns a poem::Result<T>
.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more