pub fn insert_identity(db_lock: Arc<Mutex<DB>>, identity: &Identity) -> Result<(), Error> {
    let db = db_lock.lock().unwrap();
    db.put::<_, Vec<_>>(identity.id, identity.encode()).unwrap();
    Ok(())
}
/// Commit a new identity to the local database.
Commit a new identity to the local database.
Commit a new identity to the local database .
pub fn insert_identity(db_lock: Arc<Mutex<DB>>, identity: &Identity) -> Result<(), Error> {
    let db = db_lock.lock().unwrap();
    db.put::<_, Vec<_>>(identity.id, identity.encode()).unwrap();
    Ok(())
}
pub fn insert_identity ( db_lock : Arc < Mutex < DB > > , identity : & Identity ) -> Result < ( ) , Error > { let db = db_lock . lock ( ) . unwrap ( ) ; db . put :: < _ , Vec < _ > > ( identity . id , identity . encode ( ) ) . unwrap ( ) ; Ok ( ( ) ) }
Commit a new identity to the local database.
Commit a new identity to the local database .
db_lock
Arc<Mutex<DB>>
identity
&Identity
db_lock
Arc<Mutex<DB>>
identity
&Identity