Skip to main content

Shape

Trait Shape 

Source
pub trait Shape {
    // Required method
    fn describe(d: &mut Desc);
}
Expand description

A type that can describe itself.

The description is the type’s identity in the file, so two types that describe themselves the same way are the same type as far as yo is concerned, whatever they are called in the host language.

Required Methods§

Source

fn describe(d: &mut Desc)

Write this type into the description being built.

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 Shape for String

Source§

impl Shape for bool

Source§

impl Shape for f32

Source§

impl Shape for f64

Source§

impl Shape for i8

Source§

impl Shape for i16

Source§

impl Shape for i32

Source§

impl Shape for i64

Source§

impl Shape for str

Source§

impl Shape for u8

Source§

impl Shape for u16

Source§

impl Shape for u32

Source§

impl Shape for u64

Source§

impl<K, V, S> Shape for HashMap<K, V, S>
where K: Shape, V: Shape,

Source§

impl<K, V> Shape for BTreeMap<K, V>
where K: Shape, V: Shape,

Source§

impl<T, const N: usize> Shape for [T; N]
where T: Shape,

Source§

impl<T> Shape for &T
where T: Shape + ?Sized,

Source§

impl<T> Shape for Box<T>
where T: Shape + ?Sized,

Source§

impl<T> Shape for Option<T>
where T: Shape,

Source§

impl<T> Shape for Vec<T>
where T: Shape,

Source§

impl<T> Shape for [T]
where T: Shape,

Implementors§