pub struct FunctionId {
pub name: Option<String>,
pub address: Gs2BytecodeAddress,
/* private fields */
}
Expand description
Represents the identifier of a function.
Fields§
§name: Option<String>
The name of the function, if it is not the entry point.
address: Gs2BytecodeAddress
The address of the function in the module.
Implementations§
Source§impl FunctionId
impl FunctionId
Sourcepub fn new<S>(
index: usize,
name: Option<S>,
address: Gs2BytecodeAddress,
) -> Self
pub fn new<S>( index: usize, name: Option<S>, address: Gs2BytecodeAddress, ) -> Self
Create a new FunctionId
.
§Arguments
index
: The index of the function in the module.name
: The name of the function, if it is not the entry point.address
: The address of the function in the module.
§Returns
- A new
FunctionId
instance.
§Example
use gbf_core::function::FunctionId;
let entry = FunctionId::new_without_name(0, 0);
let add = FunctionId::new(1, Some("add"), 0x100);
Sourcepub fn new_without_name(index: usize, address: Gs2BytecodeAddress) -> Self
pub fn new_without_name(index: usize, address: Gs2BytecodeAddress) -> Self
Helper method for creating a FunctionId
without a name.
Trait Implementations§
Source§impl Clone for FunctionId
impl Clone for FunctionId
Source§fn clone(&self) -> FunctionId
fn clone(&self) -> FunctionId
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 FunctionId
impl Debug for FunctionId
Source§impl<'de> Deserialize<'de> for FunctionId
impl<'de> Deserialize<'de> for FunctionId
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 Display for FunctionId
Display implementation for FunctionId
.
impl Display for FunctionId
Display implementation for FunctionId
.
Source§impl Hash for FunctionId
impl Hash for FunctionId
Source§impl Ord for FunctionId
impl Ord for FunctionId
Source§fn cmp(&self, other: &FunctionId) -> Ordering
fn cmp(&self, other: &FunctionId) -> 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 for FunctionId
impl PartialEq for FunctionId
Source§impl PartialOrd for FunctionId
impl PartialOrd for FunctionId
Source§impl Serialize for FunctionId
impl Serialize for FunctionId
impl Eq for FunctionId
impl StructuralPartialEq for FunctionId
Auto Trait Implementations§
impl Freeze for FunctionId
impl RefUnwindSafe for FunctionId
impl Send for FunctionId
impl Sync for FunctionId
impl Unpin for FunctionId
impl UnwindSafe for FunctionId
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.