Struct lightningscanner::ScanResult
source · pub struct ScanResult { /* private fields */ }Expand description
Scan result
Implementations§
source§impl ScanResult
impl ScanResult
sourcepub unsafe fn get_ptr<T>(&self, offset: isize) -> *const T
pub unsafe fn get_ptr<T>(&self, offset: isize) -> *const T
Get a pointer to the value
Gets the result address, shifts by offset bytes and casts to *const T
Safety
If any of the following conditions are violated, the result is Undefined Behavior:
-
Both the starting and resulting pointer must be either in bounds or one byte past the end of the same allocated object.
-
The computed offset, in bytes, cannot overflow an
isize. -
The offset being in bounds cannot rely on “wrapping around” the address space. That is, the infinite-precision sum, in bytes must fit in a usize.
sourcepub unsafe fn get_mut_ptr<T>(&self, offset: isize) -> *mut T
pub unsafe fn get_mut_ptr<T>(&self, offset: isize) -> *mut T
Get a mutable pointer to the value
Gets the result address, shifts by offset bytes and casts to *mut T
Safety
If any of the following conditions are violated, the result is Undefined Behavior:
-
Both the starting and resulting pointer must be either in bounds or one byte past the end of the same allocated object.
-
The computed offset, in bytes, cannot overflow an
isize. -
The offset being in bounds cannot rely on “wrapping around” the address space. That is, the infinite-precision sum, in bytes must fit in a usize.
-
The scan result was produced from an immutable reference
Trait Implementations§
source§impl Clone for ScanResult
impl Clone for ScanResult
source§fn clone(&self) -> ScanResult
fn clone(&self) -> ScanResult
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ScanResult
impl Debug for ScanResult
source§impl Hash for ScanResult
impl Hash for ScanResult
source§impl PartialEq for ScanResult
impl PartialEq for ScanResult
source§fn eq(&self, other: &ScanResult) -> bool
fn eq(&self, other: &ScanResult) -> bool
self and other values to be equal, and is used
by ==.