pub struct AppMethod<App, F, EP: ?Sized> {
app: Rc<App>,
f: F,
phantom: PhantomData<EP>,
}Expand description
An App together with a method on it. Used to pass Apps to actix_web::Handlers
as first argument. See api::EndpointDetails::add_to.
Fields§
§app: Rc<App>§f: F§phantom: PhantomData<EP>Implementations§
Trait Implementations§
Source§impl<Func, Fut, App, EP> Handler<()> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
impl<Func, Fut, App, EP> Handler<()> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
Source§impl<Func, Fut, App, EP, A> Handler<(A,)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
impl<Func, Fut, App, EP, A> Handler<(A,)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
Source§impl<Func, Fut, App, EP, A, B> Handler<(A, B)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
impl<Func, Fut, App, EP, A, B> Handler<(A, B)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
Source§impl<Func, Fut, App, EP, A, B, C> Handler<(A, B, C)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
impl<Func, Fut, App, EP, A, B, C> Handler<(A, B, C)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
Source§impl<Func, Fut, App, EP, A, B, C, D> Handler<(A, B, C, D)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
impl<Func, Fut, App, EP, A, B, C, D> Handler<(A, B, C, D)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
Source§impl<Func, Fut, App, EP, A, B, C, D, E> Handler<(A, B, C, D, E)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D, E) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
impl<Func, Fut, App, EP, A, B, C, D, E> Handler<(A, B, C, D, E)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D, E) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
Source§impl<Func, Fut, App, EP, A, B, C, D, E, F> Handler<(A, B, C, D, E, F)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D, E, F) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
impl<Func, Fut, App, EP, A, B, C, D, E, F> Handler<(A, B, C, D, E, F)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D, E, F) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
Source§impl<Func, Fut, App, EP, A, B, C, D, E, F, G> Handler<(A, B, C, D, E, F, G)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D, E, F, G) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
impl<Func, Fut, App, EP, A, B, C, D, E, F, G> Handler<(A, B, C, D, E, F, G)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D, E, F, G) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
Source§impl<Func, Fut, App, EP, A, B, C, D, E, F, G, H> Handler<(A, B, C, D, E, F, G, H)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D, E, F, G, H) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
impl<Func, Fut, App, EP, A, B, C, D, E, F, G, H> Handler<(A, B, C, D, E, F, G, H)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D, E, F, G, H) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
Source§impl<Func, Fut, App, EP, A, B, C, D, E, F, G, H, I> Handler<(A, B, C, D, E, F, G, H, I)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D, E, F, G, H, I) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
impl<Func, Fut, App, EP, A, B, C, D, E, F, G, H, I> Handler<(A, B, C, D, E, F, G, H, I)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D, E, F, G, H, I) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
Source§impl<Func, Fut, App, EP, A, B, C, D, E, F, G, H, I, J> Handler<(A, B, C, D, E, F, G, H, I, J)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D, E, F, G, H, I, J) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
impl<Func, Fut, App, EP, A, B, C, D, E, F, G, H, I, J> Handler<(A, B, C, D, E, F, G, H, I, J)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D, E, F, G, H, I, J) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
Source§impl<Func, Fut, App, EP, A, B, C, D, E, F, G, H, I, J, K> Handler<(A, B, C, D, E, F, G, H, I, J, K)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D, E, F, G, H, I, J, K) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
impl<Func, Fut, App, EP, A, B, C, D, E, F, G, H, I, J, K> Handler<(A, B, C, D, E, F, G, H, I, J, K)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D, E, F, G, H, I, J, K) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
Source§impl<Func, Fut, App, EP, A, B, C, D, E, F, G, H, I, J, K, L> Handler<(A, B, C, D, E, F, G, H, I, J, K, L)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D, E, F, G, H, I, J, K, L) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
impl<Func, Fut, App, EP, A, B, C, D, E, F, G, H, I, J, K, L> Handler<(A, B, C, D, E, F, G, H, I, J, K, L)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D, E, F, G, H, I, J, K, L) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
Source§impl<Func, Fut, App, EP, A, B, C, D, E, F, G, H, I, J, K, L, M> Handler<(A, B, C, D, E, F, G, H, I, J, K, L, M)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D, E, F, G, H, I, J, K, L, M) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
impl<Func, Fut, App, EP, A, B, C, D, E, F, G, H, I, J, K, L, M> Handler<(A, B, C, D, E, F, G, H, I, J, K, L, M)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D, E, F, G, H, I, J, K, L, M) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
Source§impl<Func, Fut, App, EP, A, B, C, D, E, F, G, H, I, J, K, L, M, N> Handler<(A, B, C, D, E, F, G, H, I, J, K, L, M, N)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D, E, F, G, H, I, J, K, L, M, N) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
impl<Func, Fut, App, EP, A, B, C, D, E, F, G, H, I, J, K, L, M, N> Handler<(A, B, C, D, E, F, G, H, I, J, K, L, M, N)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D, E, F, G, H, I, J, K, L, M, N) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
Source§impl<Func, Fut, App, EP, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> Handler<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
impl<Func, Fut, App, EP, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> Handler<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
Source§impl<Func, Fut, App, EP, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> Handler<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
impl<Func, Fut, App, EP, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> Handler<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)> for AppMethod<App, Func, EP>where
Func: Fn(Rc<App>, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) -> Fut + Clone + 'static,
Fut: Future,
App: 'static,
EP: EndpointDetails + 'static,
Fut::Output: Into<EP::ResponseType>,
Auto Trait Implementations§
impl<App, F, EP> Freeze for AppMethod<App, F, EP>
impl<App, F, EP> RefUnwindSafe for AppMethod<App, F, EP>
impl<App, F, EP> !Send for AppMethod<App, F, EP>
impl<App, F, EP> !Sync for AppMethod<App, F, EP>
impl<App, F, EP> Unpin for AppMethod<App, F, EP>
impl<App, F, EP> UnsafeUnpin for AppMethod<App, F, EP>where
F: UnsafeUnpin,
EP: ?Sized,
impl<App, F, EP> UnwindSafe for AppMethod<App, F, EP>
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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