webrender::prim_store

Trait InternablePrimitive

Source
pub trait InternablePrimitive: Internable<InternData = ()> + Sized {
    // Required methods
    fn into_key(self, info: &LayoutPrimitiveInfo) -> Self::Key;
    fn make_instance_kind(
        key: Self::Key,
        data_handle: Handle<Self>,
        prim_store: &mut PrimitiveStore,
    ) -> PrimitiveInstanceKind;
}
Expand description

Trait for primitives that are directly internable. see SceneBuilder::add_primitive

Required Methods§

Source

fn into_key(self, info: &LayoutPrimitiveInfo) -> Self::Key

Build a new key from self with info.

Source

fn make_instance_kind( key: Self::Key, data_handle: Handle<Self>, prim_store: &mut PrimitiveStore, ) -> PrimitiveInstanceKind

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 InternablePrimitive for PrimitiveKeyKind

Implementors§