Skip to main content

ShapeOf

Trait ShapeOf 

Source
pub trait ShapeOf<Alg> {
    type Shape;

    // Required method
    fn shape_of(alg: &Alg) -> Self::Shape;
}
Expand description

States a type’s shape in whichever vocabulary an interpretation provides.

The bound sits on the impl, so the trait itself demands nothing of its algebra.

Required Associated Types§

Source

type Shape

The shape the interpretation builds for this type.

Required Methods§

Source

fn shape_of(alg: &Alg) -> Self::Shape

Describes this type to the interpretation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<A, K, V> ShapeOf<A> for BTreeMap<K, V>
where A: ShapeAlg, K: ShapeOf<A, Shape = A::Ty>, V: ShapeOf<A, Shape = A::Ty>,

Source§

type Shape = <A as Sorts>::Ty

Source§

fn shape_of(alg: &A) -> A::Ty

Source§

impl<A, K, V> ShapeOf<A> for HashMap<K, V>
where A: ShapeAlg, K: ShapeOf<A, Shape = A::Ty>, V: ShapeOf<A, Shape = A::Ty>,

Source§

type Shape = <A as Sorts>::Ty

Source§

fn shape_of(alg: &A) -> A::Ty

Source§

impl<A, T, const N: usize> ShapeOf<A> for [T; N]
where A: ShapeAlg, T: ShapeOf<A, Shape = A::Ty>,

Source§

type Shape = <A as Sorts>::Ty

Source§

fn shape_of(alg: &A) -> A::Ty

Source§

impl<A, T> ShapeOf<A> for Box<T>
where A: ShapeAlg, T: ShapeOf<A, Shape = A::Ty>,

Source§

type Shape = <A as Sorts>::Ty

Source§

fn shape_of(alg: &A) -> A::Ty

Source§

impl<A, T> ShapeOf<A> for Option<T>
where A: ShapeAlg, T: ShapeOf<A, Shape = A::Ty>,

Source§

type Shape = <A as Sorts>::Ty

Source§

fn shape_of(alg: &A) -> A::Ty

Source§

impl<A, T> ShapeOf<A> for Vec<T>
where A: ShapeAlg, T: ShapeOf<A, Shape = A::Ty>,

Source§

type Shape = <A as Sorts>::Ty

Source§

fn shape_of(alg: &A) -> A::Ty

Source§

impl<A, T> ShapeOf<A> for [T]
where A: ShapeAlg, T: ShapeOf<A, Shape = A::Ty>,

Source§

type Shape = <A as Sorts>::Ty

Source§

fn shape_of(alg: &A) -> A::Ty

Source§

impl<A> ShapeOf<A> for ()
where A: ShapeAlg,

Source§

type Shape = <A as Sorts>::Ty

Source§

fn shape_of(alg: &A) -> A::Ty

Source§

impl<A> ShapeOf<A> for String
where A: ShapeAlg,

Source§

type Shape = <A as Sorts>::Ty

Source§

fn shape_of(alg: &A) -> A::Ty

Source§

impl<A> ShapeOf<A> for bool
where A: ShapeAlg,

Source§

type Shape = <A as Sorts>::Ty

Source§

fn shape_of(alg: &A) -> A::Ty

Source§

impl<A> ShapeOf<A> for f32
where A: ShapeAlg,

Source§

type Shape = <A as Sorts>::Ty

Source§

fn shape_of(alg: &A) -> A::Ty

Source§

impl<A> ShapeOf<A> for f64
where A: ShapeAlg,

Source§

type Shape = <A as Sorts>::Ty

Source§

fn shape_of(alg: &A) -> A::Ty

Source§

impl<A> ShapeOf<A> for i8
where A: ShapeAlg,

Source§

type Shape = <A as Sorts>::Ty

Source§

fn shape_of(alg: &A) -> A::Ty

Source§

impl<A> ShapeOf<A> for i16
where A: ShapeAlg,

Source§

type Shape = <A as Sorts>::Ty

Source§

fn shape_of(alg: &A) -> A::Ty

Source§

impl<A> ShapeOf<A> for i32
where A: ShapeAlg,

Source§

type Shape = <A as Sorts>::Ty

Source§

fn shape_of(alg: &A) -> A::Ty

Source§

impl<A> ShapeOf<A> for i64
where A: ShapeAlg,

Source§

type Shape = <A as Sorts>::Ty

Source§

fn shape_of(alg: &A) -> A::Ty

Source§

impl<A> ShapeOf<A> for i128
where A: ShapeAlg,

Source§

type Shape = <A as Sorts>::Ty

Source§

fn shape_of(alg: &A) -> A::Ty

Source§

impl<A> ShapeOf<A> for isize
where A: ShapeAlg,

Source§

type Shape = <A as Sorts>::Ty

Source§

fn shape_of(alg: &A) -> A::Ty

Source§

impl<A> ShapeOf<A> for str
where A: ShapeAlg,

Source§

type Shape = <A as Sorts>::Ty

Source§

fn shape_of(alg: &A) -> A::Ty

Source§

impl<A> ShapeOf<A> for u8
where A: ShapeAlg,

Source§

type Shape = <A as Sorts>::Ty

Source§

fn shape_of(alg: &A) -> A::Ty

Source§

impl<A> ShapeOf<A> for u16
where A: ShapeAlg,

Source§

type Shape = <A as Sorts>::Ty

Source§

fn shape_of(alg: &A) -> A::Ty

Source§

impl<A> ShapeOf<A> for u32
where A: ShapeAlg,

Source§

type Shape = <A as Sorts>::Ty

Source§

fn shape_of(alg: &A) -> A::Ty

Source§

impl<A> ShapeOf<A> for u64
where A: ShapeAlg,

Source§

type Shape = <A as Sorts>::Ty

Source§

fn shape_of(alg: &A) -> A::Ty

Source§

impl<A> ShapeOf<A> for u128
where A: ShapeAlg,

Source§

type Shape = <A as Sorts>::Ty

Source§

fn shape_of(alg: &A) -> A::Ty

Source§

impl<A> ShapeOf<A> for usize
where A: ShapeAlg,

Source§

type Shape = <A as Sorts>::Ty

Source§

fn shape_of(alg: &A) -> A::Ty

Implementors§