pub struct VmiProber { /* private fields */ }
Expand description
Prober for safely handling page faults during memory access operations.
Implementations§
Source§impl VmiProber
impl VmiProber
Sourcepub fn new(restricted: &IndexSet<AddressContext>) -> Self
pub fn new(restricted: &IndexSet<AddressContext>) -> Self
Creates a new prober.
Sourcepub fn probe<T, F>(&self, f: F) -> Result<Option<T>, VmiError>
pub fn probe<T, F>(&self, f: F) -> Result<Option<T>, VmiError>
Probes for safely handling page faults during memory access operations.
Sourcepub fn check_result<T>(
&self,
result: Result<T, VmiError>,
) -> Result<Option<T>, VmiError>
pub fn check_result<T>( &self, result: Result<T, VmiError>, ) -> Result<Option<T>, VmiError>
Handles a result that may contain page faults, returning the value if successful.
Sourcepub fn error_for_page_faults(&self) -> Result<(), VmiError>
pub fn error_for_page_faults(&self) -> Result<(), VmiError>
Checks for any unexpected page faults that have occurred and returns an error if any are present.
Auto Trait Implementations§
impl !Freeze for VmiProber
impl !RefUnwindSafe for VmiProber
impl Send for VmiProber
impl !Sync for VmiProber
impl Unpin for VmiProber
impl UnwindSafe for VmiProber
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