pub fn with_guard<T, S, F, G, RG, FUT>(
guard: G,
initial_state: S,
fut_const: F,
) -> impl Future<Output = (S, RG::StoppedResourceState, GuardOutput<T>)>where
S: Resource,
RG: RunningGuard,
G: Guard<RunningGuard = RG>,
FUT: Future<Output = T>,
F: FnOnce(S, G::ResourceState) -> FUT,