Skip to main content

register_type_descriptor

Function register_type_descriptor 

Source
pub fn register_type_descriptor(
    id: u64,
    name: &str,
    size: usize,
    align: usize,
) -> Result<()>
Expand description

Strictly register a custom type’s stable name and ABI layout.

Re-registering the exact same descriptor is idempotent. Reusing an id or name for a different layout is rejected so a hash collision or inconsistent declaration cannot silently pass the port contract’s numeric type_id check.