Trait bones_framework::prelude::FromWorld

source ·
pub trait FromWorld {
    // Required method
    fn from_world(world: &World) -> Self;
}
Expand description

Creates an instance of the type this trait is implemented for using data from the supplied World.

This can be helpful for complex initialization or context-aware defaults.

Required Methods§

source

fn from_world(world: &World) -> Self

Creates Self using data from the given World.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> FromWorld for T
where T: Default,