Skip to main content

AsComponentId

Trait AsComponentId 

Source
pub trait AsComponentId:
    Debug
    + Send
    + Sync {
    // Required method
    fn component_id(&self) -> Id;
}
Expand description

A source of a component id for edition declarations.

Implemented for raw id strings ("vortex.alp") and interned Ids here; encoding vtables implement it where they are defined, so a declaration can name the vtable (&Primitive) instead of spelling its id. The id alone does not say what kind of component it names — EditionMember pairs it with a ComponentKind.

Required Methods§

Source

fn component_id(&self) -> Id

The interned component id.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl AsComponentId for &'static str

Source§

impl AsComponentId for Id

Source§

impl AsComponentId for str

Implementors§