StageLabel

Trait StageLabel 

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

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

A strongly-typed class of labels used to identify Stages.

Required Methods§

Source

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§

Source

fn as_label(&self) -> StageLabelId

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

Source

fn type_id(&self) -> TypeId

Returns the [TypeId] used to differentiate labels.

Implementations on Foreign Types§

Source§

impl StageLabel for &'static str

Source§

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

Source§

impl StageLabel for BundleStage
where BundleStage: 'static,

Source§

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

Implementors§