Skip to main content

EntityId

Trait EntityId 

Source
pub trait EntityId:
    Copy
    + Eq
    + Ord
    + Hash
    + Display
    + Debug {
    // Required method
    fn raw(self) -> u128;

    // Provided method
    fn to_hex(self) -> String { ... }
}
Expand description

Common interface for all SAF entity ID types.

Provides a uniform way to access the raw u128 value and hex formatting across all ID newtypes (FunctionId, BlockId, ValueId, etc.).

Required Methods§

Source

fn raw(self) -> u128

Get the raw u128 value.

Provided Methods§

Source

fn to_hex(self) -> String

Format as hex string with 0x prefix.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§