pub struct PlanAreaServiceHandle(/* private fields */);Expand description
Registry handle for a PlanAreaService.
Implementations§
Source§impl PlanAreaServiceHandle
impl PlanAreaServiceHandle
Sourcepub fn new(service: Arc<dyn PlanAreaService>) -> Self
pub fn new(service: Arc<dyn PlanAreaService>) -> Self
Wraps a trusted plan-area service.
Sourcepub fn measure_footprint(
&self,
object: &ObjectId,
) -> Result<PlanArea, PlanAreaError>
pub fn measure_footprint( &self, object: &ObjectId, ) -> Result<PlanArea, PlanAreaError>
The footprint area of object.
Sourcepub fn measure_plan_overlap(
&self,
first: &ObjectId,
second: &ObjectId,
) -> Result<PlanArea, PlanAreaError>
pub fn measure_plan_overlap( &self, first: &ObjectId, second: &ObjectId, ) -> Result<PlanArea, PlanAreaError>
The overlap of two footprints, never larger than either footprint’s upper bound would allow; a larger answer is refused.
Sourcepub fn measure_uncovered_area(
&self,
object: &ObjectId,
cover: &[ObjectId],
growth_metres: f64,
) -> Result<PlanArea, PlanAreaError>
pub fn measure_uncovered_area( &self, object: &ObjectId, cover: &[ObjectId], growth_metres: f64, ) -> Result<PlanArea, PlanAreaError>
The area of object’s footprint that the footprints of cover, grown
by growth_metres, leave uncovered.
A growth that is negative or not finite, or an object covering itself,
is refused rather than measured; cover reaches the service sorted
and without repeats.
Sourcepub fn measure_outside_bands(
&self,
object: &ObjectId,
bands: &[PlanBand],
) -> Result<PlanArea, PlanAreaError>
pub fn measure_outside_bands( &self, object: &ObjectId, bands: &[PlanBand], ) -> Result<PlanArea, PlanAreaError>
The area of object’s footprint outside the union of bands.
A band bounded by object itself is refused rather than measured;
bands reach the service sorted and without repeats.
Sourcepub fn measure_coverage(
&self,
request: &CoverageRequest,
) -> Result<CoverageEvidence, PlanAreaError>
pub fn measure_coverage( &self, request: &CoverageRequest, ) -> Result<CoverageEvidence, PlanAreaError>
How much of the request’s subject footprint its sources cover.
An answer about another subject, or not listing exactly the requested sources in order, is refused.
Sourcepub fn measure_elevation_cover(
&self,
request: &ElevationRequest,
) -> Result<ElevationCover, PlanAreaError>
pub fn measure_elevation_cover( &self, request: &ElevationRequest, ) -> Result<ElevationCover, PlanAreaError>
The elevation of the request’s object and its uncovered part.
An answer about another object is refused.