pub struct TypeRef {
pub scope: ModPath,
pub name: ModPath,
pub params: Arc<[Type]>,
pub pos: Option<SourcePosition>,
pub ori: Option<Arc<Origin>>,
}Expand description
A reference to a named typedef, e.g. Foo or Result<i64, string>.
pos and ori are IDE metadata recording where this reference
was written in source — they’re populated by the parser and
ignored for type-system equality, ordering and hashing so they
don’t affect type identity.
Fields§
§scope: ModPath§name: ModPath§params: Arc<[Type]>§pos: Option<SourcePosition>§ori: Option<Arc<Origin>>Implementations§
Trait Implementations§
impl Eq for TypeRef
Source§impl Ord for TypeRef
impl Ord for TypeRef
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for TypeRef
impl !UnwindSafe for TypeRef
impl Freeze for TypeRef
impl Send for TypeRef
impl Sync for TypeRef
impl Unpin for TypeRef
impl UnsafeUnpin for TypeRef
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.