Skip to main content

DefaultableComponent

Trait DefaultableComponent 

Source
pub trait DefaultableComponent: DataComponentTrait {
    // Required method
    fn default_for_item(item: ItemKind) -> Option<&'static Self>
       where Self: Sized;
}
Expand description

A trait for data components that some ItemKinds may have a default value for.

Required Methods§

Source

fn default_for_item(item: ItemKind) -> Option<&'static Self>
where Self: Sized,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§