Struct srclang::analyzer::get_symbol
pub struct get_symbol { /* private fields */ }
Implementations
impl get_symbol
pub fn get<'__db>( _db: &'__db dyn Db, _src: SourceProgram, _pos: ByteOrLineColOrCoordInterned) -> &'__db Option<Spanned<Node>>
pub fn set( _db: &mut dyn Db, _src: SourceProgram, _pos: ByteOrLineColOrCoordInterned, __value: Option<Spanned<Node>> )
pub fn accumulated<'__db, __A: Accumulator>( _db: &'__db dyn Db, _src: SourceProgram, _pos: ByteOrLineColOrCoordInterned) -> Vec<<__A as Accumulator>::Data>where <Jar as Jar<'__db>>::DynDb: HasJar<<__A as Accumulator>::Jar>,
Trait Implementations
impl Configuration for get_symbol
type Jar = Jar
type SalsaStruct = SourceProgram
The “salsa struct type” that this function is associated with. This can be just salsa::Id
for functions that intern their arguments and are not clearly associated with any one salsa struct.
type Key = Id
What key is used to index the memo. Typically a salsa struct id, but if this memoized function has multiple arguments it will be a salsa::Id
that results from interning those arguments.
type Value = Option<Spanned<Node>>
The value computed by the function.
const CYCLE_STRATEGY: CycleRecoveryStrategy = salsa::cycle::CycleRecoveryStrategy::Panic
Determines whether this function can recover from being a participant in a cycle (and, if so, how).
fn should_backdate_value(v1: &Self::Value, v2: &Self::Value) -> bool
Invokes after a new result new_value`` has been computed for which an older memoized value existed
old_value`. Returns true if the new value is equal to the older one and hence should be “backdated” (i.e., marked as having last changed in an older revision, even though it was recomputed). Read more
fn execute(__db: &DynDb<'_, Self>, __id: Self::Key) -> Self::Value
Invoked when we need to compute the value for the given key, either because we’ve never computed it before or because the old one relied on inputs that have changed. Read more
fn recover_from_cycle( _db: &DynDb<'_, Self>, _cycle: &Cycle, _key: Self::Key) -> Self::Value
If the cycle strategy is Recover
, then invoked when key
is a participant in a cycle to find out what value it should have. Read more
fn key_from_id(id: Id) -> Self::Key
Given a salsa Id, returns the key. Convenience function to avoid having to type <C::Key as AsId>::from_id
.
impl HasIngredientsFor<get_symbol> for Jar
fn ingredient(&self) -> &<get_symbol as IngredientsFor>::Ingredients
fn ingredient_mut(&mut self) -> &mut <get_symbol as IngredientsFor>::Ingredients
impl IngredientsFor for get_symbol
type Ingredients = get_symbol
type Jar = Jar
fn create_ingredients<DB>(routes: &mut Routes<DB>) -> Self::Ingredientswhere DB: DbWithJar<Self::Jar> + JarFromJars<Self::Jar>,
Auto Trait Implementations
impl !Freeze for get_symbol
impl !RefUnwindSafe for get_symbol
impl Send for get_symbol
impl Sync for get_symbol
impl Unpin for get_symbol
impl UnwindSafe for get_symbol
Blanket Implementations
impl<T> Any for Twhere T: 'static + ?Sized,
fn type_id(&self) -> TypeId
Gets the TypeId
of self
. Read more
impl<T> Borrow<T> for Twhere T: ?Sized,
fn borrow(&self) -> &T
Immutably borrows from an owned value. Read more
impl<T> BorrowMut<T> for Twhere T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> From<T> for T
fn from(t: T) -> T
Returns the argument unchanged.
impl<T, U> Into<U> for Twhere U: From<T>,
fn into(self) -> U
Calls U::from(self)
.
That is, this conversion is whatever the implementation of From<T> for U
chooses to do.
impl<T> Pointable for T
const ALIGN: usize = _
The alignment of pointer.
type Init = T
The type for initializers.
unsafe fn init(init: <T as Pointable>::Init) -> usize
Initializes a with the given initializer. Read more
unsafe fn deref<'a>(ptr: usize) -> &'a T
Dereferences the given pointer. Read more
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
Mutably dereferences the given pointer. Read more
unsafe fn drop(ptr: usize)
Drops the object pointed to by the given pointer. Read more
impl<T, U> TryFrom<U> for Twhere U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
Performs the conversion.
impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
Performs the conversion.