Trait bevy::app::AppLabel

pub trait AppLabel: 'static {
    // Required method
    fn as_str(&self) -> &'static str;

    // Provided methods
    fn as_label(&self) -> AppLabelId { ... }
    fn type_id(&self) -> TypeId { ... }
}
Expand description

A strongly-typed class of labels used to identify an App.

Required Methods§

fn as_str(&self) -> &'static str

Returns the representation of this label as a string literal.

In cases where you absolutely need a label to be determined at runtime, you can use Box::leak to get a 'static reference.

Provided Methods§

fn as_label(&self) -> AppLabelId

Converts this type into an opaque, strongly-typed label.

fn type_id(&self) -> TypeId

Returns the [TypeId] used to differentiate labels.

Implementations on Foreign Types§

§

impl AppLabel for &'static str

§

fn as_str(&self) -> &'static str

Implementors§

§

impl AppLabel for RenderExtractAppwhere RenderExtractApp: 'static,

§

impl AppLabel for RenderAppwhere RenderApp: 'static,

§

impl AppLabel for AppLabelId