Skip to main content

declares_expectation

Function declares_expectation 

Source
pub fn declares_expectation<T: Controller + DeclaresExpectation>(c: T) -> T
Expand description

Identity pass-through that only compiles for a controller implementing DeclaresExpectation. app_routes! wraps a mount’s construction expression in this when the mount falls under a families prefix declared without an accepted set — so presence of a declaration is checked at compile time, and any construction form (Foo { db }, Foo::new(db), make_foo()) works without the macro naming the type.