Function cairo_lang_semantic::corelib::get_index_operator_impl
source · pub fn get_index_operator_impl(
db: &dyn SemanticGroup,
self_ty: TypeId,
ctx: &mut ComputationContext<'_>,
stable_ptr: SyntaxStablePtrId
) -> Maybe<Result<(FunctionId, usize, Mutability), SemanticDiagnosticKind>>
Expand description
Returns an infered impl of one of Index or IndexView traits, the number of snapshots to add to self_ty and the mutability of the trait self param (Reference for Index, Immutable for IndexView). Fails if no impl is found or multiple impls are found.