pub struct MultiQuery<T>(T);Expand description
A handler’s query parameters, where a parameter given more than once reads as a list.
Use this in place of actix_web::web::Query whenever the query struct has a Vec field.
web::Query deserializes with serde_urlencoded, which rejects a repeated key
(?state=a&state=b) as a duplicate map entry before any field deserializer runs, so a Vec
field can never be filled over that transport.
A Vec field accepts ?state=a&state=b and ?state=a,b alike. A scalar field is never split
on commas, so a free-text parameter may contain them; given twice, it takes the last value. A
parameter present with an empty value reads as absent.
Answers 400 when the query string does not fit T.
Tuple Fields§
§0: TImplementations§
Source§impl<T> MultiQuery<T>
impl<T> MultiQuery<T>
pub fn into_inner(self) -> T
Trait Implementations§
Source§impl<T: Debug> Debug for MultiQuery<T>
impl<T: Debug> Debug for MultiQuery<T>
Source§impl<T> Deref for MultiQuery<T>
impl<T> Deref for MultiQuery<T>
Source§impl<T: DeserializeOwned> FromRequest for MultiQuery<T>
impl<T: DeserializeOwned> FromRequest for MultiQuery<T>
Source§type Error = ControllerError
type Error = ControllerError
The associated error which can be returned.
Source§type Future = Ready<Result<MultiQuery<T>, <MultiQuery<T> as FromRequest>::Error>>
type Future = Ready<Result<MultiQuery<T>, <MultiQuery<T> as FromRequest>::Error>>
Future that resolves to a
Self. Read moreSource§fn from_request(req: &HttpRequest, _payload: &mut Payload) -> Self::Future
fn from_request(req: &HttpRequest, _payload: &mut Payload) -> Self::Future
Create a
Self from request parts asynchronously.§fn extract(req: &HttpRequest) -> Self::Future
fn extract(req: &HttpRequest) -> Self::Future
Create a
Self from request head asynchronously. Read moreAuto Trait Implementations§
impl<T> Freeze for MultiQuery<T>where
T: Freeze,
impl<T> RefUnwindSafe for MultiQuery<T>where
T: RefUnwindSafe,
impl<T> Send for MultiQuery<T>where
T: Send,
impl<T> Sync for MultiQuery<T>where
T: Sync,
impl<T> Unpin for MultiQuery<T>where
T: Unpin,
impl<T> UnsafeUnpin for MultiQuery<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for MultiQuery<T>where
T: UnwindSafe,
Blanket Implementations§
§impl<T, A, P> Access<T> for P
impl<T, A, P> Access<T> for P
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
§impl<T, A> DynAccess<T> for Awhere
A: Access<T>,
<A as Access<T>>::Guard: 'static,
impl<T, A> DynAccess<T> for Awhere
A: Access<T>,
<A as Access<T>>::Guard: 'static,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
§fn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
Decompress response bodies. Read more
§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more