pub struct Path<PathType: JsonSchema + Send + Sync> { /* private fields */ }
Expand description
Path<PathType>
is an extractor used to deserialize an instance of
PathType
from an HTTP request’s path parameters. PathType
is any
structure of yours that implements serde::Deserialize
. See this module’s
documentation for more information.
Implementations§
source§impl<PathType: JsonSchema + Send + Sync> Path<PathType>
impl<PathType: JsonSchema + Send + Sync> Path<PathType>
pub fn into_inner(self) -> PathType
Trait Implementations§
source§fn from_request<'life0, 'async_trait, Context>(
rqctx: &'life0 RequestContext<Context>
) -> Pin<Box<dyn Future<Output = Result<Path<PathType>, HttpError>> + Send + 'async_trait>>where
Context: 'async_trait + ServerContext,
'life0: 'async_trait,
fn from_request<'life0, 'async_trait, Context>(
rqctx: &'life0 RequestContext<Context>
) -> Pin<Box<dyn Future<Output = Result<Path<PathType>, HttpError>> + Send + 'async_trait>>where
Context: 'async_trait + ServerContext,
'life0: 'async_trait,
Construct an instance of this type from a
RequestContext
.fn metadata(_body_content_type: ApiEndpointBodyContentType) -> ExtractorMetadata
Auto Trait Implementations§
impl<PathType> RefUnwindSafe for Path<PathType>where
PathType: RefUnwindSafe,
impl<PathType> Send for Path<PathType>
impl<PathType> Sync for Path<PathType>
impl<PathType> Unpin for Path<PathType>where
PathType: Unpin,
impl<PathType> UnwindSafe for Path<PathType>where
PathType: 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<S> ExclusiveExtractor for Swhere
S: SharedExtractor,
impl<S> ExclusiveExtractor for Swhere
S: SharedExtractor,
source§fn from_request<'life0, 'async_trait, Context>(
rqctx: &'life0 RequestContext<Context>,
_request: Request<Body>
) -> Pin<Box<dyn Future<Output = Result<S, HttpError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Context: 'async_trait + ServerContext,
S: 'async_trait,
fn from_request<'life0, 'async_trait, Context>(
rqctx: &'life0 RequestContext<Context>,
_request: Request<Body>
) -> Pin<Box<dyn Future<Output = Result<S, HttpError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Context: 'async_trait + ServerContext,
S: 'async_trait,
Construct an instance of this type from a
RequestContext
.