Retrieve the policy for a collection as an owned value. Returns the registered policy if found, otherwise returns the default (ephemeral).
(&self, collection: &str)
| 194 | /// Retrieve the policy for a collection as an owned value. |
| 195 | /// Returns the registered policy if found, otherwise returns the default (ephemeral). |
| 196 | pub fn get_owned(&self, collection: &str) -> CollectionPolicy { |
| 197 | self.policies |
| 198 | .get(collection) |
| 199 | .cloned() |
| 200 | .unwrap_or_else(CollectionPolicy::ephemeral) |
| 201 | } |
| 202 | |
| 203 | /// Check if a collection has an explicit policy registered. |
| 204 | pub fn has(&self, collection: &str) -> bool { |
no test coverage detected