let cms = Api::<Secret>::all(client);
let mut w = watcher(cms, lp).boxed();
while let Some(event) = w.try_next().await? {
// Create new secret here, but cms is moved and not available
}
I made this working by cloning cms as cms2 and then I can create an object using cms2, but is there some way to do this without cloning? I tried to use the reference, but watcher doesn't accept it.
The basic answer is to clone cms. The backing HTTP connection and machinery is multiplexed, so that should be fine.
Most helpful comment
The basic answer is to clone
cms. The backing HTTP connection and machinery is multiplexed, so that should be fine.