pub trait Inspector: 'static {
type Options: DeserializeOwned + Default;
type Report: Serialize;
const INFO: InspectorInfo;
// Required method
fn inspect(
output: &mut Output<'_>,
picked: &[PickedElement],
options: Self::Options,
) -> GeopResult<(Self::Report, Vec<Visual>)>;
// Provided method
fn show(report: &Self::Report) -> Answer { ... }
}Expand description
A question asked of what a program built. An inspector is a unit
struct; what it is told beyond the part is its Inspector::Options.
Required Associated Constants§
const INFO: InspectorInfo
Required Associated Types§
Sourcetype Options: DeserializeOwned + Default
type Options: DeserializeOwned + Default
What it is told besides the part, as a front end sends it (JSON); the defaults where it sends none.
Required Methods§
Sourcefn inspect(
output: &mut Output<'_>,
picked: &[PickedElement],
options: Self::Options,
) -> GeopResult<(Self::Report, Vec<Visual>)>
fn inspect( output: &mut Output<'_>, picked: &[PickedElement], options: Self::Options, ) -> GeopResult<(Self::Report, Vec<Visual>)>
The answer about output — of the elements picked, for one that
picks (InspectorInfo::picks) — and what to draw of it in the
viewport: the points a distance is measured between.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".