MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / set

Method set

nodedb-crdt/src/policy.rs:165–167  ·  view source on GitHub ↗

Set the full policy for a collection (overwriting any previous policy).

(&mut self, collection: &str, policy: CollectionPolicy)

Source from the content-addressed store, hash-verified

163
164 /// Set the full policy for a collection (overwriting any previous policy).
165 pub fn set(&mut self, collection: &str, policy: CollectionPolicy) {
166 self.policies.insert(collection.to_string(), policy);
167 }
168
169 /// Remove the policy for a collection. Returns `true` if one existed.
170 pub fn remove(&mut self, collection: &str) -> bool {

Calls 2

to_stringMethod · 0.80
insertMethod · 0.45