Slots

Trait Slots 

Source
trait Slots {
    // Required methods
    fn slot<T>(self: Pin<&Self>) -> Pin<&Slot<T>>
       where T: Storable + 'static;
    fn all_slots() -> impl Iterator<Item = (TypeId, &'static str)>;
}
Expand description

Internal helper to implement Datastore::slot recursively for a cons-list of slots.

Required Methods§

Source

fn slot<T>(self: Pin<&Self>) -> Pin<&Slot<T>>
where T: Storable + 'static,

Source

fn all_slots() -> impl Iterator<Item = (TypeId, &'static str)>

Returns the TypeId and type names for all the slots stored in this type.

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.

Implementors§

Source§

impl Slots for Nil

Source§

impl<U, R> Slots for Cons<Slot<U>, R>
where U: Storable + 'static, R: Slots,