Skip to main content

ReadOnlyMapping

Trait ReadOnlyMapping 

Source
pub unsafe trait ReadOnlyMapping {
    // Required methods
    fn base(&self) -> NonNull<u8>;
    fn len(&self) -> usize;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

Native read-only mapping witness consumed by the audited binding boundary.

§Safety

The base and length must describe one live, initialized allocation for the witness lifetime. It must be OS-enforced read-only locally, cover exactly the bytes used to create the supplied ValidatedRegionLayout, and remain mapped while a bound region owns the witness.

Required Methods§

Source

fn base(&self) -> NonNull<u8>

Mapping base with allocation provenance.

Source

fn len(&self) -> usize

Exact native capability size.

Provided Methods§

Source

fn is_empty(&self) -> bool

Returns whether the capability is empty (valid witnesses are not).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§