Enum FlowType
pub enum FlowType {
Sequential,
ConditionalBranch,
UnconditionalBranch,
Call,
Return,
Switch,
Throw,
EndFinally,
Leave,
}Expand description
How an instruction affects control flow.
This enum categorizes instructions based on their control flow behavior, which is essential for building control flow graphs and performing static analysis.
§Examples
use dotscope::disassembler::FlowType;
// Different flow types
let sequential = FlowType::Sequential; // Normal instructions like add, ldloc
let branch = FlowType::ConditionalBranch; // brtrue, brfalse, etc.
let call = FlowType::Call; // call, callvirt
let ret = FlowType::Return; // ret instructionVariants§
Sequential
Normal execution continues to next instruction
ConditionalBranch
Conditional branch to another location
UnconditionalBranch
Always branches to another location (unconditional jump)
Call
Call to another method
Return
Returns from current method
Switch
Multi-way branch (switch statement)
Throw
Exception throwing
EndFinally
End of finally block
Leave
Leave protected region (try/catch/finally)
Trait Implementations§
impl Copy for FlowType
impl Eq for FlowType
impl StructuralPartialEq for FlowType
Auto Trait Implementations§
impl Freeze for FlowType
impl RefUnwindSafe for FlowType
impl Send for FlowType
impl Sync for FlowType
impl Unpin for FlowType
impl UnwindSafe for FlowType
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<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