pub struct TypeId<'db>(/* private fields */);Implementations§
Source§impl TypeId<'static>
impl TypeId<'static>
pub fn ingredient(zalsa: &Zalsa) -> &IngredientImpl<Self>
Source§impl<'db> TypeId<'db>
impl<'db> TypeId<'db>
pub fn new<Db_, T0: Lookup<TypeLongId<'db>> + Hash>( db: &'db Db_, long: T0, ) -> Self
pub fn long<Db_>(self, db: &'db Db_) -> &'db TypeLongId<'db>
Source§impl TypeId<'_>
impl TypeId<'_>
Sourcepub fn default_debug_fmt(this: Self, f: &mut Formatter<'_>) -> Resultwhere
for<'db> TypeLongId<'db>: Debug,
pub fn default_debug_fmt(this: Self, f: &mut Formatter<'_>) -> Resultwhere
for<'db> TypeLongId<'db>: Debug,
Default debug formatting for this struct (may be useful if you define your own Debug impl)
Source§impl<'db> TypeId<'db>
impl<'db> TypeId<'db>
pub fn from_intern_id(intern_id: Id) -> Self
pub fn as_intern_id(self) -> Id
Source§impl<'db> TypeId<'db>
impl<'db> TypeId<'db>
pub fn missing(db: &'db dyn Database, diag_added: DiagnosticAdded) -> Self
pub fn format(&self, db: &dyn Database) -> String
Sourcepub fn check_not_missing(&self, db: &dyn Database) -> Maybe<()>
pub fn check_not_missing(&self, db: &dyn Database) -> Maybe<()>
Returns Maybe::Err if the type is TypeLongId::Missing.
Sourcepub fn is_missing(&self, db: &dyn Database) -> bool
pub fn is_missing(&self, db: &dyn Database) -> bool
Returns true if the type is TypeLongId::Missing.
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_fully_concrete(&self, db: &dyn Database) -> bool
pub fn is_fully_concrete(&self, db: &dyn Database) -> bool
Returns true if the type does not depend on any generics.
Sourcepub fn is_var_free(&self, db: &dyn Database) -> bool
pub fn is_var_free(&self, db: &dyn Database) -> bool
Returns true if the type does not contain any inference variables.
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 is a tuple or fixed
sized array containing it.
Sourcepub fn short_name(&self, db: &dyn Database) -> String
pub fn short_name(&self, db: &dyn Database) -> String
Short name of the type argument.
Trait Implementations§
Source§impl Configuration for TypeId<'static>
impl Configuration for TypeId<'static>
const LOCATION: Location
const DEBUG_NAME: &'static str = "TypeId"
const REVISIONS: NonZeroUsize
Source§type Fields<'a> = (TypeLongId<'a>,)
type Fields<'a> = (TypeLongId<'a>,)
The fields of the struct being interned.
Source§fn serialize<S: Serializer>(
fields: &Self::Fields<'_>,
serializer: S,
) -> Result<S::Ok, S::Error>
fn serialize<S: Serializer>( fields: &Self::Fields<'_>, serializer: S, ) -> Result<S::Ok, S::Error>
Serialize the fields using
serde. Read moreSource§fn deserialize<'de, D: Deserializer<'de>>(
deserializer: D,
) -> Result<Self::Fields<'static>, D::Error>
fn deserialize<'de, D: Deserializer<'de>>( deserializer: D, ) -> Result<Self::Fields<'static>, D::Error>
Deserialize the fields using
serde. Read moreSource§impl<'db> DebugWithDb<'db> for TypeId<'db>
impl<'db> DebugWithDb<'db> for TypeId<'db>
type Db = dyn Database
fn fmt(&self, f: &mut Formatter<'_>, db: &'db Self::Db) -> 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> FromIterator<TypeId<'db>> for ImplicitPrecedence<'db>
impl<'db> FromIterator<TypeId<'db>> for ImplicitPrecedence<'db>
Source§impl<'db> Intern<'db, TypeId<'db>> for TypeLongId<'db>
impl<'db> Intern<'db, TypeId<'db>> for TypeLongId<'db>
Source§impl<'db> SalsaStructInDb for TypeId<'db>
impl<'db> SalsaStructInDb for TypeId<'db>
type MemoIngredientMap = MemoIngredientSingletonIndex
Source§fn lookup_ingredient_index(aux: &Zalsa) -> IngredientIndices
fn lookup_ingredient_index(aux: &Zalsa) -> IngredientIndices
Lookup or create ingredient indices. Read more
Source§fn entries(zalsa: &Zalsa) -> impl Iterator<Item = DatabaseKeyIndex> + '_
fn entries(zalsa: &Zalsa) -> impl Iterator<Item = DatabaseKeyIndex> + '_
Returns the IDs of any instances of this struct in the database.
Source§impl<'a, Error, TRewriter: HasDb<&'a dyn Database> + SemanticRewriter<TypeLongId<'a>, Error>> SemanticObject<TRewriter, Error> for TypeId<'a>
impl<'a, Error, TRewriter: HasDb<&'a dyn Database> + SemanticRewriter<TypeLongId<'a>, Error>> SemanticObject<TRewriter, Error> for TypeId<'a>
fn default_rewrite( &mut self, rewriter: &mut TRewriter, ) -> Result<RewriteResult, Error>
Source§impl<'db> SemanticRewriter<TypeId<'db>, DiagnosticAdded> for SubstitutionRewriter<'db, '_>
impl<'db> SemanticRewriter<TypeId<'db>, DiagnosticAdded> for SubstitutionRewriter<'db, '_>
fn internal_rewrite(&mut self, value: &mut TypeId<'db>) -> Maybe<RewriteResult>
fn rewrite(&mut self, value: T) -> Result<T, Error>
impl<'db> Copy for TypeId<'db>
impl<'db> Eq for TypeId<'db>
impl<'db> Send for TypeId<'db>
impl<'db> StructuralPartialEq for TypeId<'db>
impl<'db> Sync for TypeId<'db>
Auto Trait Implementations§
impl<'db> Freeze for TypeId<'db>
impl<'db> RefUnwindSafe for TypeId<'db>
impl<'db> Unpin for TypeId<'db>
impl<'db> UnwindSafe for TypeId<'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