Enum TypeShape
pub enum TypeShape {
Named(TypeId),
Array(Box<TypeIdentity>),
Tuple(Vec<TypeIdentity>),
Callable(Vec<TypeIdentity>, Box<TypeIdentity>),
}Expand description
Identifies nominal leaves and recursive structural types independently of names.
Equality and hashing preserve every array, tuple, and callable component; erased storage carrier identities never replace structural identity.
§Examples
See [ResolvedType::identity].
Variants§
Named(TypeId)
A concrete nominal Rust identity.
Array(Box<TypeIdentity>)
A canonical array with a recursive element identity.
Tuple(Vec<TypeIdentity>)
Source-ordered tuple fields, empty for unit.
Callable(Vec<TypeIdentity>, Box<TypeIdentity>)
Source-ordered callable parameters and result.
Trait Implementations§
§impl Clone for TypeIdentity
impl Clone for TypeIdentity
§fn clone(&self) -> TypeIdentity
fn clone(&self) -> TypeIdentity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for TypeIdentity
impl Debug for TypeIdentity
impl Eq for TypeIdentity
§impl Hash for TypeIdentity
impl Hash for TypeIdentity
§impl PartialEq for TypeIdentity
impl PartialEq for TypeIdentity
impl StructuralPartialEq for TypeIdentity
Auto Trait Implementations§
impl Freeze for TypeIdentity
impl RefUnwindSafe for TypeIdentity
impl Send for TypeIdentity
impl Sync for TypeIdentity
impl Unpin for TypeIdentity
impl UnsafeUnpin for TypeIdentity
impl UnwindSafe for TypeIdentity
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.