pub fn insert_metadata_for(&self, key: &[u8], data: &[u8]) -> Result<Metadata> {
        let meta = Metadata::new(data);
        let bytes = Metadata::serialize(&meta)?;
        self.db
            .insert(key, &bytes[..])
            .map_err(ForcepError::MetaDb)?;
        Ok(meta)
    }
/// Inserts a new entry into the metadata database for the associated key and data.
///
/// If a previous entry exists, it is simply overwritten.
Inserts a new entry into the metadata database for the associated key and data.
If a previous entry exists, it is simply overwritten.
Inserts a new entry into the metadata database for the associated key and data . If a previous entry exists it is simply overwritten .
pub fn insert_metadata_for(&self, key: &[u8], data: &[u8]) -> Result<Metadata> {
        let meta = Metadata::new(data);
        let bytes = Metadata::serialize(&meta)?;
        self.db
            .insert(key, &bytes[..])
            .map_err(ForcepError::MetaDb)?;
        Ok(meta)
    }
pub fn insert_metadata_for ( & self , key : & [ u8 ] , data : & [ u8 ] ) -> Result < Metadata > { let meta = Metadata :: new ( data ) ; let bytes = Metadata :: serialize ( & meta ) ? ; self . db . insert ( key , & bytes [ .. ] ) . map_err ( ForcepError :: MetaDb ) ? ; Ok ( meta ) }
Inserts a new entry into the metadata database for the associated key and data.
Inserts a new entry into the metadata database for the associated key and data .
&self
key
&[u8]
data
&[u8]
&self
key
&[u8]
data
&[u8]