Skip to main content

SubstrateAdapter

Trait SubstrateAdapter 

Source
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§

Source

fn read_by_hash(&self, hash: &str) -> Result<Vec<u8>, String>

Source

fn write_blob(&self, hash: &str, content: &[u8]) -> Result<(), String>

Source

fn list_hashes(&self) -> Result<Vec<String>, String>

Source

fn substrate_uri(&self) -> String

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§