pub struct Path {
pub value: PathEnum,
}Expand description
The customized representation for a local variable, heap objects, …
Resembles the Place type in rustc.
Fields§
§value: PathEnumImplementations§
source§impl Path
impl Path
sourcepub fn new_local(func_id: FuncId, ordinal: usize) -> Rc<Path>
pub fn new_local(func_id: FuncId, ordinal: usize) -> Rc<Path>
Creates a path to the local variable corresponding to the ordinal.
sourcepub fn new_parameter(func_id: FuncId, ordinal: usize) -> Rc<Path>
pub fn new_parameter(func_id: FuncId, ordinal: usize) -> Rc<Path>
Creates a path to the parameter corresponding to the ordinal.
sourcepub fn new_return_value(func_id: FuncId) -> Rc<Path>
pub fn new_return_value(func_id: FuncId) -> Rc<Path>
Creates a path to the return value.
sourcepub fn new_local_parameter_or_result(
func_id: FuncId,
ordinal: usize,
argument_count: usize
) -> Rc<Path>
pub fn new_local_parameter_or_result( func_id: FuncId, ordinal: usize, argument_count: usize ) -> Rc<Path>
Creates a path to the local variable, parameter or result local, corresponding to the ordinal.
sourcepub fn new_heap_obj(func_id: FuncId, location: Location) -> Rc<Path>
pub fn new_heap_obj(func_id: FuncId, location: Location) -> Rc<Path>
Creates a path to the heap object.
sourcepub fn new_constant() -> Rc<Path>
pub fn new_constant() -> Rc<Path>
Creates a path to a constant.
sourcepub fn new_static_variable(def_id: DefId) -> Rc<Path>
pub fn new_static_variable(def_id: DefId) -> Rc<Path>
Creates a path to a static variable.
sourcepub fn new_promoted(def_id: DefId, ordinal: usize) -> Rc<Path>
pub fn new_promoted(def_id: DefId, ordinal: usize) -> Rc<Path>
Creates a path to a promoted constant.
sourcepub fn new_argumentv1_arr() -> Rc<Path>
pub fn new_argumentv1_arr() -> Rc<Path>
Creates a path to a argumentv1 array.
sourcepub fn new_str_ref_arr() -> Rc<Path>
pub fn new_str_ref_arr() -> Rc<Path>
Creates a path to a &str array.
sourcepub fn new_qualified(base: Rc<Path>, projection: ProjectionElems) -> Rc<Path>
pub fn new_qualified(base: Rc<Path>, projection: ProjectionElems) -> Rc<Path>
Creates a path that qualifies the given root path with the given projection.
sourcepub fn new_offset(base: Rc<Path>, offset: usize) -> Rc<Path>
pub fn new_offset(base: Rc<Path>, offset: usize) -> Rc<Path>
Creates a path that qualifies the given root path with the given offset.
sourcepub fn new_index(collection_path: Rc<Path>) -> Rc<Path>
pub fn new_index(collection_path: Rc<Path>) -> Rc<Path>
Creates a path that selects the element at a given index value of the array at the given path.
sourcepub fn new_field(base: Rc<Path>, field_index: usize) -> Rc<Path>
pub fn new_field(base: Rc<Path>, field_index: usize) -> Rc<Path>
Creates a path that selects the given field of the struct at the given path.
sourcepub fn new_union_field(base: Rc<Path>, field_index: usize) -> Rc<Path>
pub fn new_union_field(base: Rc<Path>, field_index: usize) -> Rc<Path>
Creates a path that selects the given union field of the union at the given path.
sourcepub fn new_downcast(base: Rc<Path>, downcast_variant: usize) -> Rc<Path>
pub fn new_downcast(base: Rc<Path>, downcast_variant: usize) -> Rc<Path>
Creates a path that selects the given downcast of the enum at the given path.
sourcepub fn new_function(func_id: FuncId) -> Rc<Path>
pub fn new_function(func_id: FuncId) -> Rc<Path>
Creates a path referring to function item.
sourcepub fn new_deref(address_path: Rc<Path>) -> Rc<Path>
pub fn new_deref(address_path: Rc<Path>) -> Rc<Path>
Creates a path to the target memory of a reference value.
sourcepub fn dyn_ptr_metadata(dyn_ptr_path: &Rc<Path>) -> Rc<Path>
pub fn dyn_ptr_metadata(dyn_ptr_path: &Rc<Path>) -> Rc<Path>
Creates a path representing the metadata of a dynamic pointer.
sourcepub fn append_projection_elem(
path: &Rc<Path>,
projection_elem: PathSelector
) -> Rc<Path>
pub fn append_projection_elem( path: &Rc<Path>, projection_elem: PathSelector ) -> Rc<Path>
Creates a path by appending the projection elem.
sourcepub fn append_projection(
path: &Rc<Path>,
projection_elems: &ProjectionElems
) -> Rc<Path>
pub fn append_projection( path: &Rc<Path>, projection_elems: &ProjectionElems ) -> Rc<Path>
Creates a path by appending the projection elems.
pub fn add_offset(path: &Rc<Path>, offset: usize) -> Rc<Path>
sourcepub fn truncate_projection_elems(path: &Rc<Path>, len: usize) -> Rc<Path>
pub fn truncate_projection_elems(path: &Rc<Path>, len: usize) -> Rc<Path>
Creates a path by truncating the projection elems.
sourcepub fn remove_cast(path: &Rc<Path>) -> Rc<Path>
pub fn remove_cast(path: &Rc<Path>) -> Rc<Path>
Returns the original path by removing the cast.
pub fn is_constant(&self) -> bool
Trait Implementations§
source§impl PartialEq for Path
impl PartialEq for Path
impl Eq for Path
impl StructuralPartialEq for Path
Auto Trait Implementations§
impl RefUnwindSafe for Path
impl !Send for Path
impl !Sync for Path
impl Unpin for Path
impl UnwindSafe for Path
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
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
key and return true if they are equal.