pub struct Surveyor<L = Nominatim> { /* private fields */ }Implementations§
Source§impl<L> Surveyor<L>where
L: PlaceIndex,
impl<L> Surveyor<L>where
L: PlaceIndex,
pub fn new<P: NetworkProvider + 'static>(locator: L, provider: P) -> Self
pub fn with_providers( locator: L, providers: Vec<Box<dyn NetworkProvider>>, ) -> Self
pub fn survey( &self, project: &Path, query: &str, radius_km: f64, emit: impl FnMut(Event), ) -> Result<Summary>
Sourcepub fn add_region(
&self,
project: &Path,
bounds: GeoBounds,
emit: impl FnMut(Event),
) -> Result<Summary>
pub fn add_region( &self, project: &Path, bounds: GeoBounds, emit: impl FnMut(Event), ) -> Result<Summary>
Add a rectangle to the project’s live area and reconcile its union graph.
Sourcepub fn refresh(
&self,
project: &Path,
emit: impl FnMut(Event),
) -> Result<Option<Summary>>
pub fn refresh( &self, project: &Path, emit: impl FnMut(Event), ) -> Result<Option<Summary>>
Rebuild the live-area graph, fetching any missing region receipts.
Sourcepub fn remove_region(
&self,
project: &Path,
id: &str,
emit: impl FnMut(Event),
) -> Result<Option<Summary>>
pub fn remove_region( &self, project: &Path, id: &str, emit: impl FnMut(Event), ) -> Result<Option<Summary>>
Excise one rectangle and rebuild solely from the surviving receipts.
Sourcepub fn replace_region(
&self,
project: &Path,
id: &str,
bounds: GeoBounds,
emit: impl FnMut(Event),
) -> Result<Summary>
pub fn replace_region( &self, project: &Path, id: &str, bounds: GeoBounds, emit: impl FnMut(Event), ) -> Result<Summary>
Move one live rectangle while preserving its ordered slot and human name.
The desired area is committed before acquisition, just like add_region,
so an interrupted fetch remains restartable through refresh.
Trait Implementations§
Auto Trait Implementations§
impl<L = Nominatim> !RefUnwindSafe for Surveyor<L>
impl<L = Nominatim> !Send for Surveyor<L>
impl<L = Nominatim> !Sync for Surveyor<L>
impl<L = Nominatim> !UnwindSafe for Surveyor<L>
impl<L> Freeze for Surveyor<L>where
L: Freeze,
impl<L> Unpin for Surveyor<L>where
L: Unpin,
impl<L> UnsafeUnpin for Surveyor<L>where
L: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more