Skip to main content

FileMappedValue

Trait FileMappedValue 

Source
pub unsafe trait FileMappedValue { }
Expand description

A value whose representation can safely be adopted from existing file bytes.

This is the safety boundary used by PersistentFileMapped::open_existing. The crate implements it for the unsigned integer link-address types and for [LinkPart] values containing those addresses.

§Safety

Every initialized byte pattern of Self must represent a valid value, it must be safe to drop any such value, and Self must not be zero-sized.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl FileMappedValue for u8

Source§

impl FileMappedValue for u16

Source§

impl FileMappedValue for u32

Source§

impl FileMappedValue for u64

Source§

impl FileMappedValue for u128

Source§

impl FileMappedValue for usize

Source§

impl<T: FileMappedValue + LinkReference> FileMappedValue for LinkPart<T>

Implementors§