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 more