alux_shape/edge.rs
1//! Where a Rust type meets a term.
2//!
3//! A term states a shape without naming a Rust type, and mostly that is the whole story. An
4//! interpretation that holds a *type* rather than a term — a JSON-RPC generator reading an
5//! operation's `Args` and `Output` — needs the one bridge stated here.
6
7/// States a type's shape in whichever vocabulary an interpretation provides.
8///
9/// The bound sits on the impl, so the trait itself demands nothing of its algebra.
10pub trait ShapeOf<Alg> {
11 /// The shape the interpretation builds for this type.
12 type Shape;
13
14 /// Describes this type to the interpretation.
15 fn shape_of(alg: &Alg) -> Self::Shape;
16}