Type Alias makepad_live_compiler::live_node::LiveType
source · pub type LiveType = TypeId;
Aliased Type§
struct LiveType { /* private fields */ }
Implementations§
source§impl TypeId
impl TypeId
1.0.0 (const: unstable) · sourcepub fn of<T>() -> TypeIdwhere
T: 'static + ?Sized,
pub fn of<T>() -> TypeIdwhere T: 'static + ?Sized,
Returns the TypeId
of the type this generic function has been
instantiated with.
Examples
use std::any::{Any, TypeId};
fn is_string<T: ?Sized + Any>(_s: &T) -> bool {
TypeId::of::<String>() == TypeId::of::<T>()
}
assert_eq!(is_string(&0), false);
assert_eq!(is_string(&"cookie monster".to_string()), true);
Trait Implementations§
1.0.0 · source§impl Ord for TypeId
impl Ord for TypeId
1.0.0 · source§impl PartialEq<TypeId> for TypeId
impl PartialEq<TypeId> for TypeId
1.0.0 · source§impl PartialOrd<TypeId> for TypeId
impl PartialOrd<TypeId> for TypeId
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more