Trait corundum::convert::PFrom[][src]

pub trait PFrom<T, A: MemPool> {
    fn pfrom(_: T, j: &Journal<A>) -> Self;
}

An equivalent to From for persistent memory which requires a Journal to operate

Required methods

fn pfrom(_: T, j: &Journal<A>) -> Self[src]

Loading content...

Implementors

impl<A: MemPool> PFrom<&'_ str, A> for String<A>[src]

impl<A: MemPool> PFrom<&'_ str, A> for Vec<u8, A>[src]

impl<T: PSafe + PClone<A>, A: MemPool> PFrom<Ref<'_, T, A>, A> for PRefCell<T, A>[src]

fn pfrom(other: Ref<'_, T, A>, j: &Journal<A>) -> Self[src]

Crates a new PRefCell and drops the Ref

After calling this function, the Ref won’t be available anymore. It will be possible to borrow the PRefCell mutably. The new PRefCell has a new location with the same data.

impl<T: PSafe + PClone<A>, A: MemPool> PFrom<RefMut<'_, T, A>, A> for PRefCell<T, A>[src]

fn pfrom(other: RefMut<'_, T, A>, j: &Journal<A>) -> Self[src]

Crates a new PRefCell and drops the Ref

After calling this function, the Ref won’t be available anymore. It will be possible to borrow the PRefCell mutably. The new PRefCell has a new location with the same data.

impl<T: PSafe, A: MemPool> PFrom<Box<[T], Global>, A> for Vec<T, A>[src]

impl<T: PSafe, A: MemPool> PFrom<T, A> for PRefCell<T, A>[src]

fn pfrom(value: T, _j: &Journal<A>) -> Self[src]

Crates a new PRefCell

impl<T: Clone + PSafe, A: MemPool> PFrom<&'_ [T], A> for Vec<T, A>[src]

impl<T: Clone + PSafe, A: MemPool> PFrom<&'_ mut [T], A> for Vec<T, A>[src]

Loading content...