pub enum TypeLongId<'db> {
Concrete(ConcreteTypeId<'db>),
Tuple(Vec<TypeId<'db>>),
Snapshot(TypeId<'db>),
GenericParameter(GenericParamId<'db>),
Var(TypeVar<'db>),
Coupon(FunctionId<'db>),
FixedSizeArray {
type_id: TypeId<'db>,
size: ConstValueId<'db>,
},
ImplType(ImplTypeId<'db>),
Closure(ClosureTypeLongId<'db>),
Missing(DiagnosticAdded),
}Variants§
Concrete(ConcreteTypeId<'db>)
Tuple(Vec<TypeId<'db>>)
Some expressions might have invalid types during processing, either due to errors or during inference.
Snapshot(TypeId<'db>)
GenericParameter(GenericParamId<'db>)
Var(TypeVar<'db>)
Coupon(FunctionId<'db>)
FixedSizeArray
ImplType(ImplTypeId<'db>)
Closure(ClosureTypeLongId<'db>)
Missing(DiagnosticAdded)
Implementations§
Source§impl<'db> TypeLongId<'db>
impl<'db> TypeLongId<'db>
pub fn format(&self, db: &dyn Database) -> String
Sourcepub fn head(&self, db: &'db dyn Database) -> Option<TypeHead<'db>>
pub fn head(&self, db: &'db dyn Database) -> Option<TypeHead<'db>>
Returns the TypeHead for a type if available.
Sourcepub fn is_phantom(&self, db: &dyn Database) -> bool
pub fn is_phantom(&self, db: &dyn Database) -> bool
Returns whether the type is phantom.
Type is considered phantom if it has the #[phantom] attribute, (or an other attribute
declared by a plugin as defining a phantom type), or is a tuple or fixed sized array
containing it.
Trait Implementations§
Source§impl<'db> Clone for TypeLongId<'db>
impl<'db> Clone for TypeLongId<'db>
Source§fn clone(&self) -> TypeLongId<'db>
fn clone(&self) -> TypeLongId<'db>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'db> Debug for TypeLongId<'db>
impl<'db> Debug for TypeLongId<'db>
Source§impl<'db> DebugWithDb<'db> for TypeLongId<'db>
impl<'db> DebugWithDb<'db> for TypeLongId<'db>
type Db = dyn Database
fn fmt(&self, f: &mut Formatter<'_>, db: &'db dyn Database) -> Result
fn debug<'me>(&'me self, db: &'db Self::Db) -> DebugWith<'me, 'db, Self::Db>where
Self: Sized + 'me,
fn into_debug<'me>(self, db: &'db Self::Db) -> DebugWith<'me, 'db, Self::Db>where
Self: Sized + 'me,
Source§impl<'db> Hash for TypeLongId<'db>
impl<'db> Hash for TypeLongId<'db>
Source§impl<'db> Intern<'db, TypeId<'db>> for TypeLongId<'db>
impl<'db> Intern<'db, TypeId<'db>> for TypeLongId<'db>
Source§impl<'db> OptionFrom<TypeLongId<'db>> for ConcreteTypeId<'db>
impl<'db> OptionFrom<TypeLongId<'db>> for ConcreteTypeId<'db>
fn option_from(other: TypeLongId<'db>) -> Option<Self>
Source§impl<'db> PartialEq for TypeLongId<'db>
impl<'db> PartialEq for TypeLongId<'db>
Source§impl<'db, T: SemanticRewriter<ConcreteTypeId<'db>, Error> + SemanticRewriter<Vec<TypeId<'db>>, Error> + SemanticRewriter<TypeId<'db>, Error> + SemanticRewriter<GenericParamId<'db>, Error> + SemanticRewriter<TypeVar<'db>, Error> + SemanticRewriter<FunctionId<'db>, Error> + SemanticRewriter<ConstValueId<'db>, Error> + SemanticRewriter<ImplTypeId<'db>, Error> + SemanticRewriter<ClosureTypeLongId<'db>, Error>, Error> SemanticObject<T, Error> for TypeLongId<'db>
impl<'db, T: SemanticRewriter<ConcreteTypeId<'db>, Error> + SemanticRewriter<Vec<TypeId<'db>>, Error> + SemanticRewriter<TypeId<'db>, Error> + SemanticRewriter<GenericParamId<'db>, Error> + SemanticRewriter<TypeVar<'db>, Error> + SemanticRewriter<FunctionId<'db>, Error> + SemanticRewriter<ConstValueId<'db>, Error> + SemanticRewriter<ImplTypeId<'db>, Error> + SemanticRewriter<ClosureTypeLongId<'db>, Error>, Error> SemanticObject<T, Error> for TypeLongId<'db>
fn default_rewrite(&mut self, rewriter: &mut T) -> Result<RewriteResult, Error>
Source§impl<'db> SemanticRewriter<TypeLongId<'db>, DiagnosticAdded> for SubstitutionRewriter<'db, '_>
impl<'db> SemanticRewriter<TypeLongId<'db>, DiagnosticAdded> for SubstitutionRewriter<'db, '_>
fn internal_rewrite( &mut self, value: &mut TypeLongId<'db>, ) -> Maybe<RewriteResult>
fn rewrite(&mut self, value: T) -> Result<T, Error>
Source§impl<'db, 'mt> SemanticRewriter<TypeLongId<'db>, NoError> for Inference<'db, 'mt>
impl<'db, 'mt> SemanticRewriter<TypeLongId<'db>, NoError> for Inference<'db, 'mt>
fn internal_rewrite( &mut self, value: &mut TypeLongId<'db>, ) -> Result<RewriteResult, NoError>
fn rewrite(&mut self, value: T) -> Result<T, Error>
impl<'db> Eq for TypeLongId<'db>
impl<'db> StructuralPartialEq for TypeLongId<'db>
Auto Trait Implementations§
impl<'db> Freeze for TypeLongId<'db>
impl<'db> RefUnwindSafe for TypeLongId<'db>
impl<'db> Send for TypeLongId<'db>
impl<'db> Sync for TypeLongId<'db>
impl<'db> Unpin for TypeLongId<'db>
impl<'db> UnwindSafe for TypeLongId<'db>
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,
Source§impl<'db, T> DebugDbUpcast<'db, T> for Twhere
T: ?Sized,
impl<'db, T> DebugDbUpcast<'db, T> for Twhere
T: ?Sized,
fn debug_db_upcast(&'db self) -> &'db T
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more