// Converts a rusqlite row into a AppsItem.
Converts a rusqlite row into a AppsItem.
Converts a rusqlite row into a AppsItem .
fn row_to_apps_item(row: &Row) -> Result<AppsItem, rusqlite::Error> {
    let name: String = row.get("name")?;
    let version: String = row.get("version")?;
    let manifest_url: String = row.get("manifest_url")?;
    let update_url: String = row.get("update_url")?;
    let install_time: i64 = row.get("install_time")?;
    let update_time: i64 = row.get("update_time")?;
    let manifest_hash: String = row.get("manifest_hash")?;
    let package_hash: String = row.get("package_hash")?;
    let mut item = AppsItem::new(&name);
    item.set_manifest_url(&manifest_url);
    item.set_version(&version);
    item.set_update_url(&update_url);
    item.set_status(row.get("status")?);
    item.set_install_state(row.get("install_state")?);
    item.set_update_state(row.get("update_state")?);
    item.set_install_time(install_time as _);
    item.set_update_time(update_time as _);
    item.set_manifest_hash(&manifest_hash);
    item.set_package_hash(&package_hash);
    Ok(item)
}
fn row_to_apps_item ( row : & Row ) -> Result < AppsItem , rusqlite :: Error > { let name : String = row . get ( " " ) ? ; let version : String = row . get ( " " ) ? ; let manifest_url : String = row . get ( " " ) ? ; let update_url : String = row . get ( " " ) ? ; let install_time : i64 = row . get ( " " ) ? ; let update_time : i64 = row . get ( " " ) ? ; let manifest_hash : String = row . get ( " " ) ? ; let package_hash : String = row . get ( " " ) ? ; let mut item = AppsItem :: new ( & name ) ; item . set_manifest_url ( & manifest_url ) ; item . set_version ( & version ) ; item . set_update_url ( & update_url ) ; item . set_status ( row . get ( " " ) ? ) ; item . set_install_state ( row . get ( " " ) ? ) ; item . set_update_state ( row . get ( " " ) ? ) ; item . set_install_time ( install_time as _ ) ; item . set_update_time ( update_time as _ ) ; item . set_manifest_hash ( & manifest_hash ) ; item . set_package_hash ( & package_hash ) ; Ok ( item ) }
Converts a rusqlite row into a AppsItem.
Converts a rusqlite row into a AppsItem .
row
&Row