pub struct ID(/* private fields */);
Expand description
Represents an ID that can be used to look up an address in the ID database.
This struct wraps a u64
value and allows resolution of an absolute address
based on the ID’s corresponding offset.
§Example
use commonlibsse_ng::rel::id::ID;
use commonlibsse_ng::rel::ResolvableAddress;
let id = ID::new(42);
let address = id.address();
Implementations§
Trait Implementations§
Source§impl Ord for ID
impl Ord for ID
Source§impl PartialOrd for ID
impl PartialOrd for ID
Source§impl ResolvableAddress for ID
impl ResolvableAddress for ID
Source§fn offset(&self) -> Result<NonZeroUsize, DataBaseError>
fn offset(&self) -> Result<NonZeroUsize, DataBaseError>
Retrieves the offset corresponding to the ID.
§Errors
Returns an error if the ID is not found in the database.
Source§impl TryFrom<ID> for Relocation
impl TryFrom<ID> for Relocation
impl Copy for ID
impl Eq for ID
impl StructuralPartialEq for ID
Auto Trait Implementations§
impl Freeze for ID
impl RefUnwindSafe for ID
impl Send for ID
impl Sync for ID
impl Unpin for ID
impl UnwindSafe for ID
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