fn download_structure_page(structure_id: LocationID,
                           mut client: esi::Client,
                           page: u32)
                           -> thread::JoinHandle<Result<Vec<Order>>> {
    thread::spawn(move || {
        let mut tries_remaining = 3;
        let mut data: Result<Vec<Order>> = Ok(Vec::new());

        while tries_remaining > 0 {
            tries_remaining -= 1;

            data = client.get_structure_orders(structure_id, page);

            if data.is_ok() {
                break;
            }

            thread::sleep(time::Duration::from_millis(1_000));
        }

        data
    })
}
/// Download structure pages (retry 3 times)
Download structure pages (retry 3 times)
Download structure pages ( retry 3 times )
fn download_structure_page(structure_id: LocationID,
                           mut client: esi::Client,
                           page: u32)
                           -> thread::JoinHandle<Result<Vec<Order>>> {
    thread::spawn(move || {
        let mut tries_remaining = 3;
        let mut data: Result<Vec<Order>> = Ok(Vec::new());
        while tries_remaining > 0 {
            tries_remaining -= 1;
            data = client.get_structure_orders(structure_id, page);
            if data.is_ok() {
                break;
            }
            thread::sleep(time::Duration::from_millis(1_000));
        }
        data
    })
}
fn download_structure_page ( structure_id : LocationID , mut client : esi :: Client , page : u32 ) -> thread :: JoinHandle < Result < Vec < Order > > > { thread :: spawn ( move | | { let mut tries_remaining = 3 ; let mut data : Result < Vec < Order > > = Ok ( Vec :: new ( ) ) ; while tries_remaining > 0 { tries_remaining -= 1 ; data = client . get_structure_orders ( structure_id , page ) ; if data . is_ok ( ) { break ; } thread :: sleep ( time :: Duration :: from_millis ( 1_000 ) ) ; } data } ) }
Download structure pages (retry 3 times)
Download structure pages ( retry 3 times )
structure_id
LocationID
client
esi::Client
page
u32
structure_id
LocationID
client
esi::Client
page
u32