Enum paralegal_spdg::InstructionKind
source · pub enum InstructionKind {
Statement,
FunctionCall(FunctionCallInfo),
Terminator,
Start,
Return,
}
Expand description
The type of instructions we may encounter
Variants§
Statement
Some type of statement
FunctionCall(FunctionCallInfo)
A function call
Terminator
A basic block terminator, usually switchInt
Start
The beginning of a function
Return
The merged exit points of a function
Implementations§
source§impl InstructionKind
impl InstructionKind
sourcepub const fn is_statement(&self) -> bool
pub const fn is_statement(&self) -> bool
Returns true if the enum is InstructionKind::Statement otherwise false
sourcepub const fn is_function_call(&self) -> bool
pub const fn is_function_call(&self) -> bool
Returns true if the enum is InstructionKind::FunctionCall otherwise false
sourcepub const fn is_terminator(&self) -> bool
pub const fn is_terminator(&self) -> bool
Returns true if the enum is InstructionKind::Terminator otherwise false
source§impl InstructionKind
impl InstructionKind
sourcepub fn as_function_call(self) -> Option<FunctionCallInfo>
pub fn as_function_call(self) -> Option<FunctionCallInfo>
If this identifies a function call, return the information inside.
Trait Implementations§
source§impl Clone for InstructionKind
impl Clone for InstructionKind
source§fn clone(&self) -> InstructionKind
fn clone(&self) -> InstructionKind
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 InstructionKind
impl Debug for InstructionKind
source§impl<'de> Deserialize<'de> for InstructionKind
impl<'de> Deserialize<'de> for InstructionKind
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
source§impl Ord for InstructionKind
impl Ord for InstructionKind
source§fn cmp(&self, other: &InstructionKind) -> Ordering
fn cmp(&self, other: &InstructionKind) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<InstructionKind> for InstructionKind
impl PartialEq<InstructionKind> for InstructionKind
source§fn eq(&self, other: &InstructionKind) -> bool
fn eq(&self, other: &InstructionKind) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<InstructionKind> for InstructionKind
impl PartialOrd<InstructionKind> for InstructionKind
source§fn partial_cmp(&self, other: &InstructionKind) -> Option<Ordering>
fn partial_cmp(&self, other: &InstructionKind) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for InstructionKind
impl Serialize for InstructionKind
impl Copy for InstructionKind
impl Eq for InstructionKind
impl StructuralEq for InstructionKind
impl StructuralPartialEq for InstructionKind
Auto Trait Implementations§
impl RefUnwindSafe for InstructionKind
impl Send for InstructionKind
impl Sync for InstructionKind
impl Unpin for InstructionKind
impl UnwindSafe for InstructionKind
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.