pub struct ValidRegions { /* private fields */ }Expand description
Valid memory regions for pointer validation.
Uses dynamic detection on supported platforms with static fallback.
Implementations§
Source§impl ValidRegions
impl ValidRegions
Sourcepub fn from_regions(regions: Vec<MemoryRegion>) -> Self
pub fn from_regions(regions: Vec<MemoryRegion>) -> Self
Create from a list of memory regions.
Sourcepub fn contains(&self, addr: usize) -> bool
pub fn contains(&self, addr: usize) -> bool
Check if an address falls within valid regions.
If dynamic regions are available, uses precise checking. Otherwise, falls back to static bounds.
Sourcepub fn is_dynamic(&self) -> bool
pub fn is_dynamic(&self) -> bool
Check if using dynamic detection.
Trait Implementations§
Source§impl Clone for ValidRegions
impl Clone for ValidRegions
Source§fn clone(&self) -> ValidRegions
fn clone(&self) -> ValidRegions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ValidRegions
impl Debug for ValidRegions
Source§impl Default for ValidRegions
impl Default for ValidRegions
Source§fn default() -> ValidRegions
fn default() -> ValidRegions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ValidRegions
impl RefUnwindSafe for ValidRegions
impl Send for ValidRegions
impl Sync for ValidRegions
impl Unpin for ValidRegions
impl UnsafeUnpin for ValidRegions
impl UnwindSafe for ValidRegions
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more