Struct srclang::compiler::text::calculate_line_lengths
pub struct calculate_line_lengths { /* private fields */ }
Implementations
impl calculate_line_lengths
pub fn get<'__db>(db: &'__db dyn Db, src: SourceProgram) -> &'__db Vec<usize>
pub fn set(db: &mut dyn Db, src: SourceProgram, __value: Vec<usize>)
pub fn accumulated<'__db, __A: Accumulator>( db: &'__db dyn Db, src: SourceProgram) -> Vec<<__A as Accumulator>::Data>where <Jar as Jar<'__db>>::DynDb: HasJar<<__A as Accumulator>::Jar>,
Trait Implementations
impl Configuration for calculate_line_lengths
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 = SourceProgram
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 = Vec<usize>
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<calculate_line_lengths> for Jar
fn ingredient(&self) -> &<calculate_line_lengths as IngredientsFor>::Ingredients
fn ingredient_mut( &mut self ) -> &mut <calculate_line_lengths as IngredientsFor>::Ingredients
impl IngredientsFor for calculate_line_lengths
type Ingredients = calculate_line_lengths
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 calculate_line_lengths
impl !RefUnwindSafe for calculate_line_lengths
impl Send for calculate_line_lengths
impl Sync for calculate_line_lengths
impl Unpin for calculate_line_lengths
impl UnwindSafe for calculate_line_lengths
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.