Skip to main content

Crate accessible

Crate accessible 

Source
Expand description

Best-effort memory readability probes that avoid trapping on invalid pointers.

The functions in this crate are designed for FFI boundaries where you want to sanity-check user-provided pointers. They rely on platform facilities that report faults as recoverable errors instead of signalling SIGSEGV. All checks are heuristics by nature—another thread can still revoke access after a probe succeeds—so treat the results as hints rather than hard guarantees.

Enums§

CheckError
Errors returned by the probe helpers.

Functions§

probe_readable
Performs a best-effort check that the region [ptr, ptr + len) is readable without trapping.
probe_readable_range
Probes whether count consecutive T values starting at ptr are readable.
probe_readable_slice
Probes whether the provided slice resides in readable memory.
probe_readable_value
Probes whether ptr refers to a readable T value.