MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / load_delegation

Method load_delegation

atomic-identity/src/store.rs:789–795  ·  view source on GitHub ↗

Load a delegation certificate by base32 id.

(&self, id: &str)

Source from the content-addressed store, hash-verified

787
788 /// Load a delegation certificate by base32 id.
789 pub fn load_delegation(&self, id: &str) -> Result<String, IdentityError> {
790 let path = self.delegation_path(id);
791 if !path.exists() {
792 return Err(IdentityError::DelegationNotFound { id: id.to_string() });
793 }
794 Ok(fs::read_to_string(path)?)
795 }
796
797 /// Is a certificate stored under this id?
798 pub fn delegation_exists(&self, id: &str) -> bool {

Calls 2

delegation_pathMethod · 0.80
existsMethod · 0.45

Tested by 1