Skip to main content

AsEncodingId

Trait AsEncodingId 

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

A source of an encoding 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.

Required Methods§

Source

fn encoding_id(&self) -> Id

The interned encoding 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 AsEncodingId for &'static str

Source§

fn encoding_id(&self) -> Id

Source§

impl AsEncodingId for Id

Source§

fn encoding_id(&self) -> Id

Source§

impl AsEncodingId for str

Source§

fn encoding_id(&self) -> Id

Implementors§