Struct salvo_oapi::extract::JsonBody
source · pub struct JsonBody<T>(pub T);Expand description
Represents the parameters passed by the URI path.
Tuple Fields§
§0: TImplementations§
source§impl<T> JsonBody<T>
impl<T> JsonBody<T>
sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consumes self and returns the value of the parameter.
Trait Implementations§
source§impl<'de, T> Deserialize<'de> for JsonBody<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for JsonBody<T>where T: Deserialize<'de>,
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'de, T> EndpointArgRegister for JsonBody<T>where
T: Deserialize<'de> + ToSchema,
impl<'de, T> EndpointArgRegister for JsonBody<T>where T: Deserialize<'de> + ToSchema,
source§impl<'de, T> Extractible<'de> for JsonBody<T>where
T: Deserialize<'de> + Send,
impl<'de, T> Extractible<'de> for JsonBody<T>where T: Deserialize<'de> + Send,
source§fn extract<'async_trait>(
req: &'de mut Request
) -> Pin<Box<dyn Future<Output = Result<Self, ParseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'de: 'async_trait,
fn extract<'async_trait>( req: &'de mut Request ) -> Pin<Box<dyn Future<Output = Result<Self, ParseError>> + Send + 'async_trait>>where Self: 'async_trait, 'de: 'async_trait,
Extract data from request.
source§fn extract_with_arg<'life0, 'async_trait>(
req: &'de mut Request,
_arg: &'life0 str
) -> Pin<Box<dyn Future<Output = Result<Self, ParseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'de: 'async_trait,
'life0: 'async_trait,
fn extract_with_arg<'life0, 'async_trait>( req: &'de mut Request, _arg: &'life0 str ) -> Pin<Box<dyn Future<Output = Result<Self, ParseError>> + Send + 'async_trait>>where Self: 'async_trait, 'de: 'async_trait, 'life0: 'async_trait,
Extract data from request with a argument. This function used in macros internal.
source§impl<'de, T> ToRequestBody for JsonBody<T>where
T: Deserialize<'de> + ToSchema,
impl<'de, T> ToRequestBody for JsonBody<T>where T: Deserialize<'de> + ToSchema,
source§fn to_request_body(components: &mut Components) -> RequestBody
fn to_request_body(components: &mut Components) -> RequestBody
Returns
RequestBody.Auto Trait Implementations§
impl<T> RefUnwindSafe for JsonBody<T>where T: RefUnwindSafe,
impl<T> Send for JsonBody<T>where T: Send,
impl<T> Sync for JsonBody<T>where T: Sync,
impl<T> Unpin for JsonBody<T>where T: Unpin,
impl<T> UnwindSafe for JsonBody<T>where T: 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