pub fn take_ownership(&self, old: Id) {
        // load all of the data from the storage vault.
        let ids = send_until_success(CRequest::List).list();
        // use the key to unlock the data.
        let db = DBView::load(self.db.key.clone(), ListResult::new(ids.into())).expect(line_error!());

        let (to_write, to_delete) = db.writer(self.id).take_ownership(&old).expect(line_error!());
        to_write.into_iter().for_each(|req| {
            send_until_success(CRequest::Write(req));
        });
        to_delete.into_iter().for_each(|req| {
            send_until_success(CRequest::Delete(req));
        });
    }
// Take ownership of an existing chain.  Requires that the new owner knows the old key to unlock the data.
Take ownership of an existing chain.  Requires that the new owner knows the old key to unlock the data.
Take ownership of an existing chain . Requires that the new owner knows the old key to unlock the data .
pub fn take_ownership(&self, old: Id) {
        // load all of the data from the storage vault.
        let ids = send_until_success(CRequest::List).list();
        // use the key to unlock the data.
        let db = DBView::load(self.db.key.clone(), ListResult::new(ids.into())).expect(line_error!());
        let (to_write, to_delete) = db.writer(self.id).take_ownership(&old).expect(line_error!());
        to_write.into_iter().for_each(|req| {
            send_until_success(CRequest::Write(req));
        });
        to_delete.into_iter().for_each(|req| {
            send_until_success(CRequest::Delete(req));
        });
    }
pub fn take_ownership ( & self , old : Id ) { // load all of the data from the storage vault. let ids = send_until_success ( CRequest :: List ) . list ( ) ; // use the key to unlock the data. let db = DBView :: load ( self . db . key . clone ( ) , ListResult :: new ( ids . into ( ) ) ) . expect ( line_error ! ( ) ) ; let ( to_write , to_delete ) = db . writer ( self . id ) . take_ownership ( & old ) . expect ( line_error ! ( ) ) ; to_write . into_iter ( ) . for_each ( | req | { send_until_success ( CRequest :: Write ( req ) ) ; } ) ; to_delete . into_iter ( ) . for_each ( | req | { send_until_success ( CRequest :: Delete ( req ) ) ; } ) ; }
Take ownership of an existing chain.
Take ownership of an existing chain .
&self
old
Id