Trait Shapely

Source
pub trait Shapely: Sized {
    // Required method
    fn shape() -> Shape;

    // Provided methods
    fn shape_desc() -> ShapeDesc { ... }
    fn partial() -> Partial<'static> { ... }
    fn partial_from_uninit(dest: &mut MaybeUninit<Self>) -> Partial<'_> { ... }
}
Expand description

Allows querying the Shape of a type, which in turn lets us inspect any fields, build a value of this type progressively, etc.

Required Methods§

Source

fn shape() -> Shape

Returns the shape of this type

Provided Methods§

Source

fn shape_desc() -> ShapeDesc

Returns a shape def (a function that can describe this shape)

Source

fn partial() -> Partial<'static>

Allocates this shape on the heap and return a partial that allows gradually initializing its fields.

Source

fn partial_from_uninit(dest: &mut MaybeUninit<Self>) -> Partial<'_>

Initializes a Partial from a borrowed MaybeUninit<Self>.

Before calling assume_init, make sure to call Partial.build_in_place().

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Shapely for bool

Source§

impl Shapely for f32

Source§

impl Shapely for f64

Source§

impl Shapely for i8

Source§

impl Shapely for i16

Source§

impl Shapely for i32

Source§

impl Shapely for i64

Source§

impl Shapely for i128

Source§

impl Shapely for u8

Source§

impl Shapely for u16

Source§

impl Shapely for u32

Source§

impl Shapely for u64

Source§

impl Shapely for u128

Source§

impl Shapely for ()

Source§

impl Shapely for String

Source§

impl<T0> Shapely for (T0,)
where T0: Shapely,

Source§

impl<T0, T1> Shapely for (T0, T1)
where T0: Shapely, T1: Shapely,

Source§

impl<T0, T1, T2> Shapely for (T0, T1, T2)
where T0: Shapely, T1: Shapely, T2: Shapely,

Source§

impl<T0, T1, T2, T3> Shapely for (T0, T1, T2, T3)
where T0: Shapely, T1: Shapely, T2: Shapely, T3: Shapely,

Source§

impl<T0, T1, T2, T3, T4> Shapely for (T0, T1, T2, T3, T4)
where T0: Shapely, T1: Shapely, T2: Shapely, T3: Shapely, T4: Shapely,

Source§

impl<T0, T1, T2, T3, T4, T5> Shapely for (T0, T1, T2, T3, T4, T5)
where T0: Shapely, T1: Shapely, T2: Shapely, T3: Shapely, T4: Shapely, T5: Shapely,

Source§

impl<T0, T1, T2, T3, T4, T5, T6> Shapely for (T0, T1, T2, T3, T4, T5, T6)
where T0: Shapely, T1: Shapely, T2: Shapely, T3: Shapely, T4: Shapely, T5: Shapely, T6: Shapely,

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7> Shapely for (T0, T1, T2, T3, T4, T5, T6, T7)
where T0: Shapely, T1: Shapely, T2: Shapely, T3: Shapely, T4: Shapely, T5: Shapely, T6: Shapely, T7: Shapely,

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> Shapely for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
where T0: Shapely, T1: Shapely, T2: Shapely, T3: Shapely, T4: Shapely, T5: Shapely, T6: Shapely, T7: Shapely, T8: Shapely,

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> Shapely for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)
where T0: Shapely, T1: Shapely, T2: Shapely, T3: Shapely, T4: Shapely, T5: Shapely, T6: Shapely, T7: Shapely, T8: Shapely, T9: Shapely,

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Shapely for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
where T0: Shapely, T1: Shapely, T2: Shapely, T3: Shapely, T4: Shapely, T5: Shapely, T6: Shapely, T7: Shapely, T8: Shapely, T9: Shapely, T10: Shapely,

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Shapely for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
where T0: Shapely, T1: Shapely, T2: Shapely, T3: Shapely, T4: Shapely, T5: Shapely, T6: Shapely, T7: Shapely, T8: Shapely, T9: Shapely, T10: Shapely, T11: Shapely,

Source§

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

Source§

impl<V> Shapely for HashMap<String, V>
where V: Shapely,

Implementors§