pub struct AstFunction<'db>(Id, PhantomData<&'db Value<AstFunction<'static>>>);Expand description
fn foo() { }
Tuple Fields§
§0: Id§1: PhantomData<&'db Value<AstFunction<'static>>>Implementations§
Source§impl AstFunction<'static>
impl AstFunction<'static>
pub fn ingredient(db: &dyn Database) -> &IngredientImpl<AstFunction<'static>>
Source§impl<'db> AstFunction<'db>
impl<'db> AstFunction<'db>
pub fn new<Db_>(
db: &'db Db_,
span: Span<'db>,
effects: AstFunctionEffects<'db>,
fn_span: Span<'db>,
visibility: Option<AstVisibility<'db>>,
name: SpannedIdentifier<'db>,
generics: Option<SpanVec<'db, AstGenericDecl<'db>>>,
inputs: SpanVec<'db, AstFunctionInput<'db>>,
output_ty: Option<AstTy<'db>>,
where_clauses: Option<AstWhereClauses<'db>>,
body: Option<DeferredParse<'db>>,
) -> Selfwhere
Db_: ?Sized + Database,
pub fn span<Db_>(self, db: &'db Db_) -> Span<'db>where
Db_: ?Sized + Database,
pub fn effects<Db_>(self, db: &'db Db_) -> AstFunctionEffects<'db>where
Db_: ?Sized + Database,
pub fn fn_span<Db_>(self, db: &'db Db_) -> Span<'db>where
Db_: ?Sized + Database,
pub fn visibility<Db_>(self, db: &'db Db_) -> Option<AstVisibility<'db>>where
Db_: ?Sized + Database,
pub fn name<Db_>(self, db: &'db Db_) -> SpannedIdentifier<'db>where
Db_: ?Sized + Database,
pub fn generics<Db_>(
self,
db: &'db Db_,
) -> &'db Option<SpanVec<'db, AstGenericDecl<'db>>>where
Db_: ?Sized + Database,
pub fn inputs<Db_>(
self,
db: &'db Db_,
) -> &'db SpanVec<'db, AstFunctionInput<'db>>where
Db_: ?Sized + Database,
pub fn output_ty<Db_>(self, db: &'db Db_) -> Option<AstTy<'db>>where
Db_: ?Sized + Database,
pub fn where_clauses<Db_>(
self,
db: &'db Db_,
) -> &'db Option<AstWhereClauses<'db>>where
Db_: ?Sized + Database,
pub fn body<Db_>(self, db: &'db Db_) -> &'db Option<DeferredParse<'db>>where
Db_: ?Sized + Database,
Source§impl<'_db> AstFunction<'_db>
impl<'_db> AstFunction<'_db>
Sourcepub fn default_debug_fmt(this: Self, f: &mut Formatter<'_>) -> Resultwhere
for<'db, 'db> Span<'db>: Debug,
for<'db> AstFunctionEffects<'db>: Debug,
for<'db> Option<AstVisibility<'db>>: Debug,
for<'db> SpannedIdentifier<'db>: Debug,
for<'db> Option<SpanVec<'db, AstGenericDecl<'db>>>: Debug,
for<'db> SpanVec<'db, AstFunctionInput<'db>>: Debug,
for<'db> Option<AstTy<'db>>: Debug,
for<'db> Option<AstWhereClauses<'db>>: Debug,
for<'db> Option<DeferredParse<'db>>: Debug,
pub fn default_debug_fmt(this: Self, f: &mut Formatter<'_>) -> Resultwhere
for<'db, 'db> Span<'db>: Debug,
for<'db> AstFunctionEffects<'db>: Debug,
for<'db> Option<AstVisibility<'db>>: Debug,
for<'db> SpannedIdentifier<'db>: Debug,
for<'db> Option<SpanVec<'db, AstGenericDecl<'db>>>: Debug,
for<'db> SpanVec<'db, AstFunctionInput<'db>>: Debug,
for<'db> Option<AstTy<'db>>: Debug,
for<'db> Option<AstWhereClauses<'db>>: Debug,
for<'db> Option<DeferredParse<'db>>: Debug,
Default debug formatting for this struct (may be useful if you define your own Debug impl)
Trait Implementations§
Source§impl<'db> Clone for AstFunction<'db>
impl<'db> Clone for AstFunction<'db>
Source§fn clone(&self) -> AstFunction<'db>
fn clone(&self) -> AstFunction<'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 Configuration for AstFunction<'static>
impl Configuration for AstFunction<'static>
Source§const DEBUG_NAME: &'static str = "AstFunction"
const DEBUG_NAME: &'static str = "AstFunction"
The debug name of the tracked struct.
Source§const FIELD_DEBUG_NAMES: &'static [&'static str]
const FIELD_DEBUG_NAMES: &'static [&'static str]
The debug names of any fields.
Source§const TRACKED_FIELD_INDICES: &'static [usize]
const TRACKED_FIELD_INDICES: &'static [usize]
The relative indices of any tracked fields.
Source§type Fields<'db> = (Span<'db>, AstFunctionEffects<'db>, Span<'db>, Option<AstVisibility<'db>>, SpannedIdentifier<'db>, Option<SpanVec<'db, AstGenericDecl<'db>>>, SpanVec<'db, AstFunctionInput<'db>>, Option<AstTy<'db>>, Option<AstWhereClauses<'db>>, Option<DeferredParse<'db>>)
type Fields<'db> = (Span<'db>, AstFunctionEffects<'db>, Span<'db>, Option<AstVisibility<'db>>, SpannedIdentifier<'db>, Option<SpanVec<'db, AstGenericDecl<'db>>>, SpanVec<'db, AstFunctionInput<'db>>, Option<AstTy<'db>>, Option<AstWhereClauses<'db>>, Option<DeferredParse<'db>>)
A (possibly empty) tuple of the fields for this struct.
Source§type Revisions = Array<Revision, 0>
type Revisions = Array<Revision, 0>
A array of [
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> = AstFunction<'db>
Source§fn struct_from_id<'db>(id: Id) -> Self::Struct<'db>
fn struct_from_id<'db>(id: Id) -> Self::Struct<'db>
Create an end-user struct from the underlying raw pointer. Read more
Source§fn deref_struct(s: Self::Struct<'_>) -> Id
fn deref_struct(s: Self::Struct<'_>) -> Id
Deref the struct to yield the underlying 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
Create a new value revision array where each element is set to
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
Update the field data and, if the value has changed,
the appropriate entry in the
revisions array (tracked fields only). Read moreSource§impl Debug for AstFunction<'_>
impl Debug for AstFunction<'_>
Source§impl<'db> From<AstFunction<'db>> for Anchor<'db>
impl<'db> From<AstFunction<'db>> for Anchor<'db>
Source§fn from(value: AstFunction<'db>) -> Self
fn from(value: AstFunction<'db>) -> Self
Converts to this type from the input type.
Source§impl<'db> From<AstFunction<'db>> for AstItem<'db>
impl<'db> From<AstFunction<'db>> for AstItem<'db>
Source§fn from(value: AstFunction<'db>) -> Self
fn from(value: AstFunction<'db>) -> Self
Converts to this type from the input type.
Source§impl<'db> From<AstFunction<'db>> for AstMember<'db>
impl<'db> From<AstFunction<'db>> for AstMember<'db>
Source§fn from(value: AstFunction<'db>) -> Self
fn from(value: AstFunction<'db>) -> Self
Converts to this type from the input type.
Source§impl<'db> Hash for AstFunction<'db>
impl<'db> Hash for AstFunction<'db>
Source§impl<'db> Ord for AstFunction<'db>
impl<'db> Ord for AstFunction<'db>
Source§fn cmp(&self, other: &AstFunction<'db>) -> Ordering
fn cmp(&self, other: &AstFunction<'db>) -> Ordering
1.21.0 · 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
Source§impl<'db> PartialEq for AstFunction<'db>
impl<'db> PartialEq for AstFunction<'db>
Source§impl<'db> PartialOrd for AstFunction<'db>
impl<'db> PartialOrd for AstFunction<'db>
Source§impl SalsaStructInDb for AstFunction<'_>
impl SalsaStructInDb for AstFunction<'_>
Source§impl<'db> Serialize for AstFunction<'db>
impl<'db> Serialize for AstFunction<'db>
Source§impl<'db> Spanned<'db> for AstFunction<'db>
impl<'db> Spanned<'db> for AstFunction<'db>
Source§impl TrackedStructInDb for AstFunction<'_>
impl TrackedStructInDb for AstFunction<'_>
Source§fn database_key_index(db: &dyn Database, id: Id) -> DatabaseKeyIndex
fn database_key_index(db: &dyn Database, id: Id) -> DatabaseKeyIndex
Converts the identifier for this tracked struct into a
DatabaseKeyIndex.Source§impl Update for AstFunction<'_>
impl Update for AstFunction<'_>
impl<'db> Copy for AstFunction<'db>
impl<'db> Eq for AstFunction<'db>
impl Send for AstFunction<'_>
impl<'db> StructuralPartialEq for AstFunction<'db>
impl Sync for AstFunction<'_>
Auto Trait Implementations§
impl<'db> Freeze for AstFunction<'db>
impl<'db> !RefUnwindSafe for AstFunction<'db>
impl<'db> Unpin for AstFunction<'db>
impl<'db> UnsafeUnpin for AstFunction<'db>
impl<'db> !UnwindSafe for AstFunction<'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,
§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
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.§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<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>
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