I am trying to understand the following code in actix-web
pub fn resource<F, R>(self, path: &str, f: F) -> App<S>
where
F: FnOnce(&mut Resource<S>) -> R + 'static,
From my understanding, resource
is a function that takes 2 parameters: a string slice and a function.
The function can be used only once and accepts a mutable reference of Resource
with S
inside and returns R
for which R
and S
is completely arbitrary.
What is R + static
?