Skip to main content

RegionPredicate

Trait RegionPredicate 

Source
pub trait RegionPredicate<Os>
where Os: VmiOs,
{ // Required method fn matches(&self, region: &Os::Region<'_>) -> Result<bool, VmiError>; }
Expand description

Predicate used by VmiOsProcessExt::find_region.

Required Methods§

Source

fn matches(&self, region: &Os::Region<'_>) -> Result<bool, VmiError>

Returns Ok(true) if region matches the predicate.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<Os> RegionPredicate<Os> for &String
where Os: VmiOs,

Source§

fn matches(&self, region: &Os::Region<'_>) -> Result<bool, VmiError>

Matches a mapped region whose backing file path equals self case-insensitively.

Private regions and mapped regions without a backing path always return Ok(false). Regions do not carry a name of their own, so the backing-file path is the only string identifier a &str predicate can sensibly compare against.

Source§

impl<Os> RegionPredicate<Os> for &str
where Os: VmiOs,

Source§

fn matches(&self, region: &Os::Region<'_>) -> Result<bool, VmiError>

Matches a mapped region whose backing file path equals self case-insensitively.

Private regions and mapped regions without a backing path always return Ok(false). Regions do not carry a name of their own, so the backing-file path is the only string identifier a &str predicate can sensibly compare against.

Implementors§

Source§

impl<Os, F> RegionPredicate<Os> for F
where Os: VmiOs, F: Fn(&Os::Region<'_>) -> Result<bool, VmiError>,

Source§

impl<Os> RegionPredicate<Os> for AnyRegion
where Os: VmiOs,