pub struct BranchInfo {
pub arch: Option<CoreArchitecture>,
pub kind: BranchKind,
}
Fields§
§arch: Option<CoreArchitecture>
If None
the target architecture is the same as the branch instruction.
kind: BranchKind
Implementations§
source§impl BranchInfo
impl BranchInfo
sourcepub fn new(kind: BranchKind) -> Self
pub fn new(kind: BranchKind) -> Self
Branches to an instruction with the current architecture.
sourcepub fn new_with_arch(kind: BranchKind, arch: CoreArchitecture) -> Self
pub fn new_with_arch(kind: BranchKind, arch: CoreArchitecture) -> Self
Branches to an instruction with an explicit architecture.
Use this if your architecture can transition to another architecture with a branch.
pub fn target(&self) -> Option<u64>
Trait Implementations§
source§impl Clone for BranchInfo
impl Clone for BranchInfo
source§fn clone(&self) -> BranchInfo
fn clone(&self) -> BranchInfo
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 BranchInfo
impl Debug for BranchInfo
source§impl Default for BranchInfo
impl Default for BranchInfo
source§fn default() -> BranchInfo
fn default() -> BranchInfo
Returns the “default value” for a type. Read more
source§impl From<BranchInfo> for BNBranchType
impl From<BranchInfo> for BNBranchType
source§fn from(value: BranchInfo) -> Self
fn from(value: BranchInfo) -> Self
Converts to this type from the input type.
source§impl From<BranchKind> for BranchInfo
impl From<BranchKind> for BranchInfo
source§fn from(value: BranchKind) -> Self
fn from(value: BranchKind) -> Self
Converts to this type from the input type.
source§impl Hash for BranchInfo
impl Hash for BranchInfo
source§impl PartialEq for BranchInfo
impl PartialEq for BranchInfo
impl Copy for BranchInfo
impl Eq for BranchInfo
impl StructuralPartialEq for BranchInfo
Auto Trait Implementations§
impl Freeze for BranchInfo
impl RefUnwindSafe for BranchInfo
impl Send for BranchInfo
impl Sync for BranchInfo
impl Unpin for BranchInfo
impl UnwindSafe for BranchInfo
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