Skip to main content

SoleWriterMapping

Trait SoleWriterMapping 

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

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

Native sole-writer mapping witness consumed by the audited binding boundary.

§Safety

In addition to the allocation requirements of ReadOnlyMapping, this must be the only writable mapping for the region and safe code must be unable to duplicate the witness or recover a second writer while it is owned here.

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§