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§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