W3cubDocs

/Rust

Function type_id_eq

pub const fn type_id_eq(a: TypeId, b: TypeId) -> bool
🔬This is a nightly-only experimental API. (core_intrinsics)

Tests (at compile-time) if two crate::any::TypeId instances identify the same type. This is necessary because at const-eval time the actual discriminating data is opaque and cannot be inspected directly.

The stabilized version of this intrinsic is the PartialEq impl for core::any::TypeId.

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/intrinsics/fn.type_id_eq.html