bevy_render::extract_resource

Trait ExtractResource

Source
pub trait ExtractResource: Resource {
    type Source: Resource;

    // Required method
    fn extract_resource(source: &Self::Source) -> Self;
}
Expand description

Describes how a resource gets extracted for rendering.

Therefore the resource is transferred from the “main world” into the “render world” in the ExtractSchedule step.

Required Associated Types§

Required Methods§

Source

fn extract_resource(source: &Self::Source) -> Self

Defines how the resource is transferred into the “render world”.

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§