Trait fedimint_core::db::DatabaseValue

source ·
pub trait DatabaseValue: Sized + Debug {
    // Required methods
    fn from_bytes(
        data: &[u8],
        modules: &ModuleDecoderRegistry,
    ) -> Result<Self, DecodingError>;
    fn to_bytes(&self) -> Vec<u8> ;
}
Expand description

DatabaseValue that represents the value structure of database records.

Required Methods§

source

fn from_bytes( data: &[u8], modules: &ModuleDecoderRegistry, ) -> Result<Self, DecodingError>

source

fn to_bytes(&self) -> Vec<u8>

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> DatabaseValue for T
where T: Debug + Encodable + Decodable,