Struct srclang::analyzer::span_text

pub struct span_text { /* private fields */ }

Implementations

impl span_text

pub fn get<'__db>(db: &'__db dyn Db, span: Spanned) -> &'__db String

pub fn set(db: &mut dyn Db, span: Spanned, __value: String)

pub fn accumulated<'__db, __A: Accumulator>( db: &'__db dyn Db, span: Spanned) -> Vec<<__A as Accumulator>::Data>where <Jar as Jar<'__db>>::DynDb: HasJar<<__A as Accumulator>::Jar>,

Trait Implementations

impl Configuration for span_text

type Jar = Jar

type SalsaStruct = Spanned

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 = Spanned

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::Idthat results from interning those arguments.

type Value = String

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<span_text> for Jar

fn ingredient(&self) -> &<span_text as IngredientsFor>::Ingredients

fn ingredient_mut(&mut self) -> &mut <span_text as IngredientsFor>::Ingredients

impl IngredientsFor for span_text

type Ingredients = span_text

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 span_text

impl !RefUnwindSafe for span_text

impl Send for span_text

impl Sync for span_text

impl Unpin for span_text

impl UnwindSafe for span_text

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.