Questions tagged [quantified-constraints]

16 questions
0
votes
1 answer

Function as trait with output type polymorphic in lifetime

How do I express a constraint like fn apply_to_foos(f: F) where for<'a> F: fn(&'a mut Foo) -> impl Future + 'a { ... } (The above expression doesn't work because constraints can't have impl in them) If this isn't possible,…
1
2