pub struct StatementsLocations {
pub locations: UnorderedHashMap<StatementIdx, Vec<StableLocation>>,
}
Expand description
The locations in the Cairo source code which caused a statement to be generated.
Fields§
§locations: UnorderedHashMap<StatementIdx, Vec<StableLocation>>
Implementations§
source§impl StatementsLocations
impl StatementsLocations
sourcepub fn from_locations_vec(locations_vec: &[Vec<StableLocation>]) -> Self
pub fn from_locations_vec(locations_vec: &[Vec<StableLocation>]) -> Self
Creates a new StatementsLocations object from a list of Option<StableLocation>
.
sourcepub fn get_statements_functions_map_for_tests(
&self,
db: &dyn DefsGroup,
) -> UnorderedHashMap<StatementIdx, String>
pub fn get_statements_functions_map_for_tests( &self, db: &dyn DefsGroup, ) -> UnorderedHashMap<StatementIdx, String>
Builds a map between each Sierra statement index and a string representation of the Cairo function that it was generated from. It is used for places without db access such as the profiler.
sourcepub fn extract_statements_functions(
&self,
db: &dyn DefsGroup,
) -> StatementsFunctions
pub fn extract_statements_functions( &self, db: &dyn DefsGroup, ) -> StatementsFunctions
Creates a new StatementsFunctions struct using StatementsLocations and DefsGroup.
sourcepub fn extract_statements_source_code_locations(
&self,
db: &dyn DefsGroup,
) -> StatementsSourceCodeLocations
pub fn extract_statements_source_code_locations( &self, db: &dyn DefsGroup, ) -> StatementsSourceCodeLocations
Creates a new StatementsSourceCodeLocations struct using StatementsLocations and DefsGroup.
Trait Implementations§
source§impl Clone for StatementsLocations
impl Clone for StatementsLocations
source§fn clone(&self) -> StatementsLocations
fn clone(&self) -> StatementsLocations
Returns a copy 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 Debug for StatementsLocations
impl Debug for StatementsLocations
source§impl Default for StatementsLocations
impl Default for StatementsLocations
source§fn default() -> StatementsLocations
fn default() -> StatementsLocations
Returns the “default value” for a type. Read more
source§impl PartialEq for StatementsLocations
impl PartialEq for StatementsLocations
impl Eq for StatementsLocations
impl StructuralPartialEq for StatementsLocations
Auto Trait Implementations§
impl Freeze for StatementsLocations
impl RefUnwindSafe for StatementsLocations
impl Send for StatementsLocations
impl Sync for StatementsLocations
impl Unpin for StatementsLocations
impl UnwindSafe for StatementsLocations
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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