pub trait SubstrateAdapter: Send + Sync {
// Required methods
fn read_by_hash(&self, hash: &str) -> Result<Vec<u8>, String>;
fn write_blob(&self, hash: &str, content: &[u8]) -> Result<(), String>;
fn list_hashes(&self) -> Result<Vec<String>, String>;
fn substrate_uri(&self) -> String;
}Expand description
Core Substrate Adapter trait for reading, writing, and listing content-addressed MCard blobs.
Required Methods§
fn read_by_hash(&self, hash: &str) -> Result<Vec<u8>, String>
fn write_blob(&self, hash: &str, content: &[u8]) -> Result<(), String>
fn list_hashes(&self) -> Result<Vec<String>, String>
fn substrate_uri(&self) -> String
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".