Trait wgpu_core::identity::IdentityHandlerFactory

source ·
pub trait IdentityHandlerFactory<I: TypedId> {
    type Input: Copy;

    // Required methods
    fn autogenerate_ids() -> bool;
    fn input_to_id(id_in: Self::Input) -> I;

    // Provided method
    fn spawn(&self) -> Arc<IdentityManager<I>> { ... }
}
Expand description

A type that can produce IdentityManager filters for ids of type I.

See the module-level documentation for details.

Required Associated Types§

Required Methods§

source

fn autogenerate_ids() -> bool

source

fn input_to_id(id_in: Self::Input) -> I

Provided Methods§

source

fn spawn(&self) -> Arc<IdentityManager<I>>

Create an IdentityManager<I> implementation that can transform proto-ids into ids of type I. It can return None if ids are passed from outside and are not generated by wgpu

Object Safety§

This trait is not object safe.

Implementors§