pub trait StorageBackend {
// Required methods
fn get(&self, path_or_hash: &str) -> RhoResult<Vec<u8>>;
fn put(
&self,
path: &str,
bytes: &[u8],
expected_previous_digest: Option<&str>,
) -> RhoResult<String>;
fn list(&self, prefix: &str) -> RhoResult<Vec<StorageEntry>>;
fn head(&self, space_id: &str) -> RhoResult<StateDigest>;
fn propose(&self, change_set: &SignedChangeSet) -> RhoResult<ProposalId>;
fn fetch_proposal(&self, id: &ProposalId) -> RhoResult<SignedChangeSet>;
}Required Methods§
fn get(&self, path_or_hash: &str) -> RhoResult<Vec<u8>>
fn put( &self, path: &str, bytes: &[u8], expected_previous_digest: Option<&str>, ) -> RhoResult<String>
fn list(&self, prefix: &str) -> RhoResult<Vec<StorageEntry>>
fn head(&self, space_id: &str) -> RhoResult<StateDigest>
fn propose(&self, change_set: &SignedChangeSet) -> RhoResult<ProposalId>
fn fetch_proposal(&self, id: &ProposalId) -> RhoResult<SignedChangeSet>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".