[−][src]Trait holochain_persistence_api::cas::storage::ContentAddressableStorage
content addressable store (CAS) implements storage in memory or persistently anything implementing AddressableContent can be added and fetched by address CAS is append only
Required methods
fn add(&mut self, content: &dyn AddressableContent) -> PersistenceResult<()>
adds AddressableContent to the ContentAddressableStorage by its Address as Content
fn contains(&self, address: &Address) -> PersistenceResult<bool>
true if the Address is in the Store, false otherwise. may be more efficient than retrieve depending on the implementation.
fn fetch(&self, address: &Address) -> PersistenceResult<Option<Content>>
returns Some AddressableContent if it is in the Store, else None AddressableContent::from_content() can be used to allow the compiler to infer the type @see the fetch implementation for ExampleCas in the cas module tests