Skip to main content

Value

Trait Value 

Source
pub unsafe trait Value: Sized {
    // Required methods
    fn into_raw(self) -> u64;
    unsafe fn from_raw_unchecked(raw: u64) -> Self;
}
Expand description

Values that can be safely stored in a SequentialMap.

§Safety

Implementer must guarantee that Self has the same memory layout as a u64.

Required Methods§

Source

fn into_raw(self) -> u64

Erase the type of this value, returning a u64.

Source

unsafe fn from_raw_unchecked(raw: u64) -> Self

§Safety

Caller must guarantee that:

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Value for i64

Source§

fn into_raw(self) -> u64

Source§

unsafe fn from_raw_unchecked(raw: u64) -> Self

Source§

impl Value for u64

Source§

fn into_raw(self) -> u64

Source§

unsafe fn from_raw_unchecked(raw: u64) -> Self

Source§

impl<'v, T: 'v + Sized> Value for &'v T

Source§

fn into_raw(self) -> u64

Source§

unsafe fn from_raw_unchecked(raw: u64) -> Self

Source§

impl<T: Sized> Value for Box<T>

Source§

fn into_raw(self) -> u64

Source§

unsafe fn from_raw_unchecked(raw: u64) -> Self

Source§

impl<T: Sized> Value for Rc<T>

Source§

fn into_raw(self) -> u64

Source§

unsafe fn from_raw_unchecked(raw: u64) -> Self

Implementors§

Source§

impl<T: Sized> Value for Arc<T>