Skip to main content

HasId

Trait HasId 

Source
pub trait HasId {
    const TYPE_NAME: &'static str;

    // Required method
    fn id(&self) -> ObjId;
}
Expand description

A type with an [ObjectId].

Implementing types should ensure that the id is updated when an object is cloned.

Required Associated Constants§

Source

const TYPE_NAME: &'static str

Required Methods§

Source

fn id(&self) -> ObjId

The id of this object.

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§

Source§

impl HasId for DeclarationPtr

Source§

const TYPE_NAME: &'static str = "DeclarationPtrInner"

Source§

impl HasId for SymbolTablePtr

Source§

const TYPE_NAME: &'static str = "SymbolTable"