pub struct PlanSpanServiceHandle(/* private fields */);Expand description
Registry handle for a PlanSpanService.
Implementations§
Source§impl PlanSpanServiceHandle
impl PlanSpanServiceHandle
Sourcepub fn new(service: Arc<dyn PlanSpanService>) -> Self
pub fn new(service: Arc<dyn PlanSpanService>) -> Self
Wraps a trusted plan-span service.
Sourcepub fn measure_diameter(
&self,
object: &ObjectId,
) -> Result<PlanLength, PlanSpanError>
pub fn measure_diameter( &self, object: &ObjectId, ) -> Result<PlanLength, PlanSpanError>
The longest plan diagonal of object’s footprint.
Sourcepub fn measure_span(
&self,
first: &ObjectId,
second: &ObjectId,
between: PlanSpan,
) -> Result<PlanLength, PlanSpanError>
pub fn measure_span( &self, first: &ObjectId, second: &ObjectId, between: PlanSpan, ) -> Result<PlanLength, PlanSpanError>
The span between two footprints; one object twice is refused rather than measured against itself.
Sourcepub fn measure_centre(
&self,
object: &ObjectId,
) -> Result<PlanCentre, PlanSpanError>
pub fn measure_centre( &self, object: &ObjectId, ) -> Result<PlanCentre, PlanSpanError>
The centre of object’s footprint; a centre naming another object
is refused.
Sourcepub fn measure_rectangle(
&self,
object: &ObjectId,
) -> Result<PlanRectangle, PlanSpanError>
pub fn measure_rectangle( &self, object: &ObjectId, ) -> Result<PlanRectangle, PlanSpanError>
The least-area rectangle enclosing object’s footprint; a rectangle
naming another object is refused.
Sourcepub fn measure_recesses(
&self,
object: &ObjectId,
) -> Result<PlanRecesses, PlanSpanError>
pub fn measure_recesses( &self, object: &ObjectId, ) -> Result<PlanRecesses, PlanSpanError>
The recesses of object’s footprint; recesses naming another object
are refused.
Sourcepub fn measure_section(
&self,
objects: &[ObjectId],
) -> Result<PlanSection, PlanSpanError>
pub fn measure_section( &self, objects: &[ObjectId], ) -> Result<PlanSection, PlanSpanError>
The section objects share. No object is refused, and so is a
section naming other objects than those asked for.
Sourcepub fn measure_corridor_ends(
&self,
request: &CorridorEndRequest,
) -> Result<CorridorEnds, PlanSpanError>
pub fn measure_corridor_ends( &self, request: &CorridorEndRequest, ) -> Result<CorridorEnds, PlanSpanError>
The corridor ends of the request’s space; an answer about another space, or a wall not measured against exactly the requested subjects in order, is refused.
Sourcepub fn measure_side_distances(
&self,
request: &SideDistanceRequest,
) -> Result<SideDistances, PlanSpanError>
pub fn measure_side_distances( &self, request: &SideDistanceRequest, ) -> Result<SideDistances, PlanSpanError>
The candidates beside each side of the request’s object; an answer to another request is refused.