pub struct SymAggregate<'db>(Id, PhantomData<&'db Value<SymAggregate<'static>>>);Tuple Fields§
§0: Id§1: PhantomData<&'db Value<SymAggregate<'static>>>Implementations§
Source§impl SymAggregate<'static>
impl SymAggregate<'static>
pub fn ingredient(db: &dyn Database) -> &IngredientImpl<SymAggregate<'static>>
Source§impl<'db> SymAggregate<'db>
impl<'db> SymAggregate<'db>
pub fn new<Db_>(
db: &'db Db_,
super_scope: ScopeItem<'db>,
source: AstAggregate<'db>,
) -> Selfwhere
Db_: ?Sized + Database,
fn super_scope<Db_>(self, db: &'db Db_) -> ScopeItem<'db>where
Db_: ?Sized + Database,
fn source<Db_>(self, db: &'db Db_) -> AstAggregate<'db>where
Db_: ?Sized + Database,
Source§impl<'_db> SymAggregate<'_db>
impl<'_db> SymAggregate<'_db>
Sourcepub fn default_debug_fmt(this: Self, f: &mut Formatter<'_>) -> Result
pub fn default_debug_fmt(this: Self, f: &mut Formatter<'_>) -> Result
Default debug formatting for this struct (may be useful if you define your own Debug impl)
Source§impl<'db> SymAggregate<'db>
impl<'db> SymAggregate<'db>
Sourcepub fn name(&self, db: &'db dyn Database) -> Identifier<'db>
pub fn name(&self, db: &'db dyn Database) -> Identifier<'db>
Name of the class.
Sourcepub fn style(self, db: &'db dyn Db) -> SymAggregateStyle
pub fn style(self, db: &'db dyn Db) -> SymAggregateStyle
Aggregate style (struct, etc)
Sourcepub fn len_generics(&self, db: &'db dyn Db) -> usize
pub fn len_generics(&self, db: &'db dyn Db) -> usize
Number of generic parameters
Sourcepub fn generic_kinds(
&self,
db: &'db dyn Db,
) -> impl Iterator<Item = SymGenericKind> + 'db
pub fn generic_kinds( &self, db: &'db dyn Db, ) -> impl Iterator<Item = SymGenericKind> + 'db
Kinds of generic parameters
Sourcepub fn name_span(&self, db: &'db dyn Db) -> Span<'db>
pub fn name_span(&self, db: &'db dyn Db) -> Span<'db>
Span of the class name, typically used in diagnostics.
Also returned by the Spanned impl.
Sourcepub fn generics_span(&self, db: &'db dyn Db) -> Span<'db>
pub fn generics_span(&self, db: &'db dyn Db) -> Span<'db>
Span where generics are declared (possibly the name span, if there are no generics)
Sourcepub fn generic_span(&self, db: &'db dyn Db, index: usize) -> Span<'db>
pub fn generic_span(&self, db: &'db dyn Db, index: usize) -> Span<'db>
Span where the indexth generics are is (possibly the name span, if there are no generics)
§Panics
If index is not a valid generic index
Sourcepub(crate) fn symbols(
self: SymAggregate<'db>,
db: &'db dyn Db,
) -> &'db SignatureSymbols<'db>
pub(crate) fn symbols( self: SymAggregate<'db>, db: &'db dyn Db, ) -> &'db SignatureSymbols<'db>
Returns the symbols for this class header (generic arguments).
Sourcepub(crate) fn class_scope(self, db: &'db dyn Db) -> Scope<'db, 'db>
pub(crate) fn class_scope(self, db: &'db dyn Db) -> Scope<'db, 'db>
Returns the base scope used to resolve the class members.
Typically this is created by invoke Scope::new.
Sourcepub fn self_ty(self, db: &'db dyn Db, scope: &Scope<'_, 'db>) -> SymTy<'db>
pub fn self_ty(self, db: &'db dyn Db, scope: &Scope<'_, 'db>) -> SymTy<'db>
Returns the type of this class, referencing the generics that appear in scope.
Sourcepub fn members(
self: SymAggregate<'db>,
db: &'db dyn Db,
) -> &'db Vec<SymClassMember<'db>>
pub fn members( self: SymAggregate<'db>, db: &'db dyn Db, ) -> &'db Vec<SymClassMember<'db>>
Tracked list of class members.
Sourcepub fn inherent_member(
self: SymAggregate<'db>,
db: &'db dyn Db,
id: Identifier<'db>,
) -> Option<SymClassMember<'db>>
pub fn inherent_member( self: SymAggregate<'db>, db: &'db dyn Db, id: Identifier<'db>, ) -> Option<SymClassMember<'db>>
Returns the member with the given name, if it exists.
Sourcepub fn inherent_member_str(
self,
db: &'db dyn Db,
id: &str,
) -> Option<SymClassMember<'db>>
pub fn inherent_member_str( self, db: &'db dyn Db, id: &str, ) -> Option<SymClassMember<'db>>
Returns the member with the given name, if it exists.
Sourcepub fn fields(self, db: &'db dyn Db) -> impl Iterator<Item = SymField<'db>>
pub fn fields(self, db: &'db dyn Db) -> impl Iterator<Item = SymField<'db>>
Returns iterator over all fields in this class.
Sourcepub fn methods(self, db: &'db dyn Db) -> impl Iterator<Item = SymFunction<'db>>
pub fn methods(self, db: &'db dyn Db) -> impl Iterator<Item = SymFunction<'db>>
Returns iterator over all methods in this class.
Trait Implementations§
Source§impl<'db> Clone for SymAggregate<'db>
impl<'db> Clone for SymAggregate<'db>
Source§fn clone(&self) -> SymAggregate<'db>
fn clone(&self) -> SymAggregate<'db>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Configuration for SymAggregate<'static>
impl Configuration for SymAggregate<'static>
Source§const DEBUG_NAME: &'static str = "SymAggregate"
const DEBUG_NAME: &'static str = "SymAggregate"
Source§const FIELD_DEBUG_NAMES: &'static [&'static str]
const FIELD_DEBUG_NAMES: &'static [&'static str]
Source§const TRACKED_FIELD_INDICES: &'static [usize]
const TRACKED_FIELD_INDICES: &'static [usize]
Source§type Fields<'db> = (ScopeItem<'db>, AstAggregate<'db>)
type Fields<'db> = (ScopeItem<'db>, AstAggregate<'db>)
Source§type Revisions = Array<Revision, 0>
type Revisions = Array<Revision, 0>
Revision][] values, one per each of the tracked value fields.
When a struct is re-recreated in a new revision, the corresponding
entries for each field are updated to the new revision if their
values have changed (or if the field is marked as #[no_eq]).type Struct<'db> = SymAggregate<'db>
Source§fn struct_from_id<'db>(id: Id) -> Self::Struct<'db>
fn struct_from_id<'db>(id: Id) -> Self::Struct<'db>
Source§fn deref_struct(s: Self::Struct<'_>) -> Id
fn deref_struct(s: Self::Struct<'_>) -> Id
fn untracked_fields(fields: &Self::Fields<'_>) -> impl Hash
Source§fn new_revisions(current_revision: Revision_) -> Self::Revisions
fn new_revisions(current_revision: Revision_) -> Self::Revisions
current_revision.Source§unsafe fn update_fields<'db>(
current_revision: Revision_,
revisions: &mut Self::Revisions,
old_fields: *mut Self::Fields<'db>,
new_fields: Self::Fields<'db>,
) -> bool
unsafe fn update_fields<'db>( current_revision: Revision_, revisions: &mut Self::Revisions, old_fields: *mut Self::Fields<'db>, new_fields: Self::Fields<'db>, ) -> bool
revisions array (tracked fields only). Read moreSource§impl Debug for SymAggregate<'_>
impl Debug for SymAggregate<'_>
Source§impl Display for SymAggregate<'_>
impl Display for SymAggregate<'_>
Source§impl<'db> From<SymAggregate<'db>> for NameResolutionSym<'db>
impl<'db> From<SymAggregate<'db>> for NameResolutionSym<'db>
Source§fn from(value: SymAggregate<'db>) -> Self
fn from(value: SymAggregate<'db>) -> Self
Source§impl<'scope, 'db> From<SymAggregate<'db>> for ScopeChainKind<'scope, 'db>
impl<'scope, 'db> From<SymAggregate<'db>> for ScopeChainKind<'scope, 'db>
Source§fn from(value: SymAggregate<'db>) -> Self
fn from(value: SymAggregate<'db>) -> Self
Source§impl<'db> From<SymAggregate<'db>> for ScopeItem<'db>
impl<'db> From<SymAggregate<'db>> for ScopeItem<'db>
Source§fn from(value: SymAggregate<'db>) -> Self
fn from(value: SymAggregate<'db>) -> Self
Source§impl<'db> From<SymAggregate<'db>> for SignatureSource<'db>
impl<'db> From<SymAggregate<'db>> for SignatureSource<'db>
Source§fn from(value: SymAggregate<'db>) -> Self
fn from(value: SymAggregate<'db>) -> Self
Source§impl<'db> From<SymAggregate<'db>> for SymItem<'db>
impl<'db> From<SymAggregate<'db>> for SymItem<'db>
Source§fn from(value: SymAggregate<'db>) -> Self
fn from(value: SymAggregate<'db>) -> Self
Source§impl<'db> From<SymAggregate<'db>> for SymTyName<'db>
impl<'db> From<SymAggregate<'db>> for SymTyName<'db>
Source§fn from(value: SymAggregate<'db>) -> Self
fn from(value: SymAggregate<'db>) -> Self
Source§impl<'db> Hash for SymAggregate<'db>
impl<'db> Hash for SymAggregate<'db>
Source§impl<'db> Ord for SymAggregate<'db>
impl<'db> Ord for SymAggregate<'db>
Source§fn cmp(&self, other: &SymAggregate<'db>) -> Ordering
fn cmp(&self, other: &SymAggregate<'db>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<'db> PartialEq for SymAggregate<'db>
impl<'db> PartialEq for SymAggregate<'db>
Source§impl<'db> PartialOrd for SymAggregate<'db>
impl<'db> PartialOrd for SymAggregate<'db>
Source§impl SalsaStructInDb for SymAggregate<'_>
impl SalsaStructInDb for SymAggregate<'_>
Source§impl<'db> ScopeTreeNode<'db> for SymAggregate<'db>
impl<'db> ScopeTreeNode<'db> for SymAggregate<'db>
fn direct_super_scope(self, db: &'db dyn Db) -> Option<ScopeItem<'db>>
fn direct_generic_parameters( self, db: &'db dyn Db, ) -> &'db Vec<SymVariable<'db>>
Source§fn into_scope(self, db: &'db dyn Db) -> Scope<'db, 'db>
fn into_scope(self, db: &'db dyn Db) -> Scope<'db, 'db>
fn push_direct_ast_where_clauses( self, db: &'db dyn Db, out: &mut Vec<AstWhereClause<'db>>, )
Source§fn iter_super_scopes(
self,
db: &'db dyn Db,
) -> impl Iterator<Item = ScopeItem<'db>>
fn iter_super_scopes( self, db: &'db dyn Db, ) -> impl Iterator<Item = ScopeItem<'db>>
Source§fn transitive_generic_parameters(self, db: &'db dyn Db) -> Vec<SymVariable<'db>>
fn transitive_generic_parameters(self, db: &'db dyn Db) -> Vec<SymVariable<'db>>
Source§fn expected_generic_parameters(self, db: &'db dyn Db) -> usize
fn expected_generic_parameters(self, db: &'db dyn Db) -> usize
fn push_transitive_where_clauses( self, db: &'db dyn Db, out: &mut Vec<AstWhereClause<'db>>, )
Source§impl<'db> Serialize for SymAggregate<'db>
impl<'db> Serialize for SymAggregate<'db>
Source§impl<'db> SourceSpanned<'db> for SymAggregate<'db>
impl<'db> SourceSpanned<'db> for SymAggregate<'db>
fn source_span(&self, db: &'db dyn Db) -> Span<'db>
Source§impl<'db> Spanned<'db> for SymAggregate<'db>
impl<'db> Spanned<'db> for SymAggregate<'db>
Source§impl TrackedStructInDb for SymAggregate<'_>
impl TrackedStructInDb for SymAggregate<'_>
Source§fn database_key_index(db: &dyn Database, id: Id) -> DatabaseKeyIndex
fn database_key_index(db: &dyn Database, id: Id) -> DatabaseKeyIndex
DatabaseKeyIndex.Source§impl Update for SymAggregate<'_>
impl Update for SymAggregate<'_>
impl<'db> Copy for SymAggregate<'db>
impl<'db> Eq for SymAggregate<'db>
impl Send for SymAggregate<'_>
impl<'db> StructuralPartialEq for SymAggregate<'db>
impl Sync for SymAggregate<'_>
Auto Trait Implementations§
impl<'db> Freeze for SymAggregate<'db>
impl<'db> !RefUnwindSafe for SymAggregate<'db>
impl<'db> Unpin for SymAggregate<'db>
impl<'db> UnsafeUnpin for SymAggregate<'db>
impl<'db> !UnwindSafe for SymAggregate<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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
§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
key and return true if they are equal.§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
§impl<T> HashEqLike<T> for T
impl<T> HashEqLike<T> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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