Type Alias dync::SmallValue

source ·
pub type SmallValue<V> = Value<MaybeUninit<usize>, V>;

Aliased Type§

struct SmallValue<V> { /* private fields */ }

Implementations§

source§

impl<V: HasDrop> SmallValue<V>

source

pub fn try_new<T: Any + DropBytes>( value: T ) -> Option<Value<MaybeUninit<usize>, V>>
where V: VTable<T>,

source

pub fn new<T: Any + DropBytes>(value: T) -> Value<MaybeUninit<usize>, V>
where V: VTable<T>,

This function will panic if the given type does not fit into a usize.

source§

impl<V: ?Sized + HasDrop> SmallValue<V>

source

pub fn upcast<U: HasDrop + From<V>>(self) -> SmallValue<U>
where V: Clone,

source

pub fn into_raw_parts(self) -> (MaybeUninit<usize>, TypeId, usize, Ptr<V>)

Convert this value into its destructured parts.

The caller must insure that the memory allocated by the returned bytes is freed.