Co-authored-by: Nilton Constantino <nilton.constantino@visma.com> Reviewed-on: #8
27 lines
920 B
Rust
27 lines
920 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
/// Unique identifier for a function within a program.
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
|
#[serde(transparent)]
|
|
pub struct FunctionId(pub u32);
|
|
|
|
/// Unique identifier for a constant value.
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
|
#[serde(transparent)]
|
|
pub struct ConstId(pub u32);
|
|
|
|
/// Unique identifier for a type.
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
|
#[serde(transparent)]
|
|
pub struct TypeId(pub u32);
|
|
|
|
/// Unique identifier for a value (usually a local slot).
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
|
#[serde(transparent)]
|
|
pub struct ValueId(pub u32);
|
|
|
|
/// Unique identifier for a field within a HIP object.
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
|
#[serde(transparent)]
|
|
pub struct FieldId(pub u32);
|