pub async fn apply_resource<K>(api: &Api<K>, resource: &K) -> Result<(), Error>where K: Resource + Clone + Send + DeserializeOwned + Serialize + Debug + 'static, <K as Resource>::DynamicType: Default,