pub struct NoApi<T>(pub T);
Expand description
Allows non OperationInput or OperationOutput types to be used in aide handlers with a default empty documentation.
For types that already implement OperationInput or OperationOutput it overrides the documentation and hides it.
ⓘ
pub async fn my_sqlx_tx_endpoint(
NoApi(mut tx): NoApi<Tx<sqlx::Any>> // allows usage of the TX
) -> NoApi<Json<YourResult>> // Hides the API of the return type
Tuple Fields§
§0: T
Implementations§
source§impl<T> NoApi<T>
impl<T> NoApi<T>
sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Unwraps [self] into its inner type
Trait Implementations§
source§impl<'de, T> Deserialize<'de> for NoApi<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for NoApi<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<T, S, B> FromRequest<S, B, ViaRequest> for NoApi<T>where
T: FromRequest<S, B>,
S: Send + Sync,
B: Send + 'static,
Available on crate feature axum
only.
impl<T, S, B> FromRequest<S, B, ViaRequest> for NoApi<T>where T: FromRequest<S, B>, S: Send + Sync, B: Send + 'static,
Available on crate feature
axum
only.source§impl<T, S> FromRequestParts<S> for NoApi<T>where
T: FromRequestParts<S>,
S: Send + Sync,
Available on crate feature axum
only.
impl<T, S> FromRequestParts<S> for NoApi<T>where T: FromRequestParts<S>, S: Send + Sync,
Available on crate feature
axum
only.source§impl<T> IntoResponse for NoApi<T>where
T: IntoResponse,
Available on crate feature axum
only.
impl<T> IntoResponse for NoApi<T>where T: IntoResponse,
Available on crate feature
axum
only.source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.
source§impl<T> IntoResponseParts for NoApi<T>where
T: IntoResponseParts,
Available on crate feature axum
only.
impl<T> IntoResponseParts for NoApi<T>where T: IntoResponseParts,
Available on crate feature
axum
only.source§impl<T> OperationInput for NoApi<T>
impl<T> OperationInput for NoApi<T>
source§fn operation_input(ctx: &mut GenContext, operation: &mut Operation)
fn operation_input(ctx: &mut GenContext, operation: &mut Operation)
Modify the operation. Read more
source§fn inferred_early_responses(
ctx: &mut GenContext,
operation: &mut Operation
) -> Vec<(Option<u16>, Response)>
fn inferred_early_responses( ctx: &mut GenContext, operation: &mut Operation ) -> Vec<(Option<u16>, Response)>
Inferred early responses are used to document early returns for
extractors, guards inside handlers. For example these could represent
JSON parsing errors, authentication failures. Read more
source§impl<T> OperationOutput for NoApi<T>
impl<T> OperationOutput for NoApi<T>
source§fn operation_response(
ctx: &mut GenContext,
operation: &mut Operation
) -> Option<Response>
fn operation_response( ctx: &mut GenContext, operation: &mut Operation ) -> Option<Response>
Return a response documentation for this type,
alternatively modify the operation if required. Read more
source§fn inferred_responses(
ctx: &mut GenContext,
operation: &mut Operation
) -> Vec<(Option<u16>, Response)>
fn inferred_responses( ctx: &mut GenContext, operation: &mut Operation ) -> Vec<(Option<u16>, Response)>
Inferred responses are used when the type is
used as a request handler return type. Read more
source§impl<T: Ord> Ord for NoApi<T>
impl<T: Ord> Ord for NoApi<T>
source§impl<T: PartialEq> PartialEq<NoApi<T>> for NoApi<T>
impl<T: PartialEq> PartialEq<NoApi<T>> for NoApi<T>
source§impl<T: PartialOrd> PartialOrd<NoApi<T>> for NoApi<T>
impl<T: PartialOrd> PartialOrd<NoApi<T>> for NoApi<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<T: Copy> Copy for NoApi<T>
impl<T: Eq> Eq for NoApi<T>
impl<T> StructuralEq for NoApi<T>
impl<T> StructuralPartialEq for NoApi<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for NoApi<T>where T: RefUnwindSafe,
impl<T> Send for NoApi<T>where T: Send,
impl<T> Sync for NoApi<T>where T: Sync,
impl<T> Unpin for NoApi<T>where T: Unpin,
impl<T> UnwindSafe for NoApi<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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<S, B, T> FromRequest<S, B, ViaParts> for Twhere
B: Send + 'static,
S: Send + Sync,
T: FromRequestParts<S>,
impl<S, B, T> FromRequest<S, B, ViaParts> for Twhere B: Send + 'static, S: Send + Sync, T: FromRequestParts<S>,
source§impl<T, S, B> Handler<IntoResponseHandler, S, B> for Twhere
T: IntoResponse + Clone + Send + 'static,
B: Send + 'static,
impl<T, S, B> Handler<IntoResponseHandler, S, B> for Twhere T: IntoResponse + Clone + Send + 'static, B: Send + 'static,
§type Future = Ready<Response<UnsyncBoxBody<Bytes, Error>>>
type Future = Ready<Response<UnsyncBoxBody<Bytes, Error>>>
The type of future calling this handler returns.
source§fn call(
self,
_req: Request<B>,
_state: S
) -> <T as Handler<IntoResponseHandler, S, B>>::Future
fn call( self, _req: Request<B>, _state: S ) -> <T as Handler<IntoResponseHandler, S, B>>::Future
Call the handler with the given request.
source§fn layer<L, NewReqBody>(self, layer: L) -> Layered<L, Self, T, S, B, NewReqBody>where
L: Layer<HandlerService<Self, T, S, B>> + Clone,
<L as Layer<HandlerService<Self, T, S, B>>>::Service: Service<Request<NewReqBody>>,
fn layer<L, NewReqBody>(self, layer: L) -> Layered<L, Self, T, S, B, NewReqBody>where L: Layer<HandlerService<Self, T, S, B>> + Clone, <L as Layer<HandlerService<Self, T, S, B>>>::Service: Service<Request<NewReqBody>>,
Apply a
tower::Layer
to the handler. Read moresource§fn with_state(self, state: S) -> HandlerService<Self, T, S, B>
fn with_state(self, state: S) -> HandlerService<Self, T, S, B>
Convert the handler into a
Service
by providing the statesource§impl<H, T, B> HandlerWithoutStateExt<T, B> for Hwhere
H: Handler<T, (), B>,
impl<H, T, B> HandlerWithoutStateExt<T, B> for Hwhere H: Handler<T, (), B>,
source§fn into_service(self) -> HandlerService<H, T, (), B>
fn into_service(self) -> HandlerService<H, T, (), B>
Convert the handler into a
Service
and no state.source§fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, (), B>>
fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, (), B>>
Convert the handler into a
MakeService
and no state. Read moresource§fn into_make_service_with_connect_info<C>(
self
) -> IntoMakeServiceWithConnectInfo<HandlerService<H, T, (), B>, C>
fn into_make_service_with_connect_info<C>( self ) -> IntoMakeServiceWithConnectInfo<HandlerService<H, T, (), B>, C>
Available on crate feature
tokio
only.Convert the handler into a
MakeService
which stores information
about the incoming connection and has no state. Read more