pub struct Path {
pub path_id: String,
pub blocks: Vec<BlockId>,
pub kind: PathKind,
pub entry: BlockId,
pub exit: BlockId,
}Expand description
Execution path through a CFG
Represents a sequence of basic blocks from an entry block to an exit block. Each path has a unique identifier derived from a BLAKE3 hash of the block sequence for deduplication and comparison.
Fields§
§path_id: StringUnique identifier (BLAKE3 hash of block sequence)
blocks: Vec<BlockId>Ordered block IDs in execution order
kind: PathKindClassification of this path
entry: BlockIdFirst block (entry)
exit: BlockIdLast block (exit)
Implementations§
Source§impl Path
impl Path
Sourcepub fn new(blocks: Vec<BlockId>, kind: PathKind) -> Self
pub fn new(blocks: Vec<BlockId>, kind: PathKind) -> Self
Create a new path from a block sequence
Sourcepub fn with_id(path_id: String, blocks: Vec<BlockId>, kind: PathKind) -> Self
pub fn with_id(path_id: String, blocks: Vec<BlockId>, kind: PathKind) -> Self
Create a path with a pre-existing path_id (for loading from cache)
§Arguments
path_id- The stored path identifierblocks- Ordered block IDs in execution orderkind- Path classification
§Note
This bypasses the normal path_id computation. Use only when loading previously stored paths where the path_id was already computed.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Path
impl<'de> Deserialize<'de> for Path
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Path
impl StructuralPartialEq for Path
Auto Trait Implementations§
impl Freeze for Path
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnsafeUnpin 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
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§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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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