Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 889 Bytes

INTERFACE.md

File metadata and controls

24 lines (18 loc) · 889 Bytes

Interfaces

Interfaces should appear when we add more than the AU data source when we have more general idea how to abstract multiple data sources with multiple sources available.

@TODO Worth it? Async-trait to provide abstracted interface to submods @TODO Worth it? https://internals.rust-lang.org/t/async-traits-the-less-dynamic-allocations-edition/13048/2

Interface future?

let puller_au = gis_puller::Puller::new('au');
let sources_au = gis_puller::Catalog::sources(settings_au, 'localities/boundaries').await?;
sources_au.pull_all('/tmp').await?;
sources_au.pull_all_tmp().await?;
sources_au.pull_one('nsw').await?;

Errors?

PullerError 1st class enum:

  • rest/API HTTP/protocol errors
  • JSON/data deserialsiation/corruption etc. errors - enforce schemas?