[−][src]Trait holochain_persistence_api::cas::content::AddressableContent
can be stored as serialized content the content is the address, there is no "location" like a file system or URL @see https://en.wikipedia.org/wiki/Content-addressable_storage
Required methods
fn content(&self) -> Content
the Content that would be stored in a ContentAddressableStorage
the default implementation covers anything that implements From
fn try_from_content(content: &Content) -> Result<Self, JsonError> where
Self: Sized,
Self: Sized,
restore/deserialize the original struct/type from serialized Content
the default implementation covers anything that implements From
Provided methods
fn address(&self) -> Address
the Address the Content would be available at once stored in a ContentAddressableStorage default implementation is provided as hashing Content with sha256 the default implementation should cover most use-cases it is critical that there are no hash collisions across all stored AddressableContent it is recommended to implement an "address space" prefix for address algorithms that don't offer strong cryptographic guarantees like sha et. al.
Implementors
impl AddressableContent for ExampleAddressableContent
[src]
fn content(&self) -> Content
[src]
fn try_from_content(content: &Content) -> Result<Self, JsonError>
[src]
impl AddressableContent for OtherExampleAddressableContent
[src]
address is calculated eagerly rather than on call
fn address(&self) -> Address
[src]
fn content(&self) -> Content
[src]
fn try_from_content(content: &Content) -> Result<Self, JsonError>
[src]
impl AddressableContent for ExampleEntry
[src]
fn address(&self) -> Address
[src]
fn content(&self) -> Content
[src]
fn try_from_content(content: &Content) -> JsonResult<ExampleEntry>
[src]
impl AddressableContent for Content
[src]
fn content(&self) -> Content
[src]
fn try_from_content(content: &Content) -> Result<Self, JsonError>
[src]
impl<A: Attribute> AddressableContent for EntityAttributeValueIndex<A> where
A: DeserializeOwned,
[src]
A: DeserializeOwned,