Trait lockchain_core::traits::Body[][src]

pub trait Body: DeserializeOwned + Serialize + Send {
    fn get_field(&self, key: &str) -> Option<&Payload>;
fn set_field(&mut self, key: &str, value: Payload) -> Option<()>;
fn flatten(&mut self) -> Option<()>; }

A Body trait that can be implemented to hook into the generic Record data module.

This allows working with both encrypted and cleartext data bodies.

Required Methods

Get the value of a field from this body

Set the value of a field

Remove versioning and flatten the data tree to a single level.

Implementors