[][src]Trait swim_mem::alloc::Stow

pub trait Stow<'b, T: ?Sized = Self> {
    unsafe fn stow(
        src: *mut Self,
        dst: *mut T,
        hold: &dyn Hold<'b>
    ) -> Result<(), HoldError>;
unsafe fn unstow(src: *mut Self, dst: *mut T); }

A type that can be recursively moved into a Hold.

Required methods

unsafe fn stow(
    src: *mut Self,
    dst: *mut T,
    hold: &dyn Hold<'b>
) -> Result<(), HoldError>

Moves the value at the src pointer to the dst pointer, recursively moving all child values into the hold. If a child stow operation fails, then any already completed child stow operations get reverted by calling unstow on the child.

unsafe fn unstow(src: *mut Self, dst: *mut T)

Reverts the most recent stow operation by moving the value at the dst pointer back to the src pointer from whence it came. The memory at the src address will be in the same state the stow operation left it in.

Safety

The src and dst pointers must not be aliased outside the current call stack.

Loading content...

Implementations on Foreign Types

impl<'b> Stow<'b, f16> for f16[src]

impl<'b> Stow<'b, Murmur3> for Murmur3[src]

Loading content...

Implementors

impl<'a, 'b, R: ResidentStow<'b, Hard<'a, R>, Hard<'b, R>>> Stow<'b, Hard<'b, R>> for Hard<'a, R>[src]

impl<'a, 'b, R: ResidentStow<'b, Hard<'a, R>, Hard<'b, R>>> Stow<'b, Soft<'b, R>> for Soft<'a, R>[src]

impl<'a, 'b, R: ResidentStow<'b, Ptr<'a, R>, Ptr<'b, R>>> Stow<'b, Ptr<'b, R>> for Ptr<'a, R>[src]

impl<'a, 'b, R: ResidentStow<'b, Raw<'a, R>, Raw<'b, R>>> Stow<'b, Raw<'b, R>> for Raw<'a, R>[src]

impl<'b> Stow<'b, ()> for ()[src]

impl<'b> Stow<'b, bool> for bool[src]

impl<'b> Stow<'b, char> for char[src]

impl<'b> Stow<'b, f32> for f32[src]

impl<'b> Stow<'b, f64> for f64[src]

impl<'b> Stow<'b, i16> for i16[src]

impl<'b> Stow<'b, i32> for i32[src]

impl<'b> Stow<'b, i64> for i64[src]

impl<'b> Stow<'b, i8> for i8[src]

impl<'b> Stow<'b, isize> for isize[src]

impl<'b> Stow<'b, str> for str[src]

impl<'b> Stow<'b, u16> for u16[src]

impl<'b> Stow<'b, u32> for u32[src]

impl<'b> Stow<'b, u64> for u64[src]

impl<'b> Stow<'b, u8> for u8[src]

impl<'b> Stow<'b, usize> for usize[src]

impl<'b, T0: Stow<'b>, T1: Stow<'b>> Stow<'b, (T0, T1)> for (T0, T1)[src]

impl<'b, T0: Stow<'b>, T1: Stow<'b>, T2: Stow<'b>> Stow<'b, (T0, T1, T2)> for (T0, T1, T2)[src]

impl<'b, T0: Stow<'b>, T1: Stow<'b>, T2: Stow<'b>, T3: Stow<'b>> Stow<'b, (T0, T1, T2, T3)> for (T0, T1, T2, T3)[src]

impl<'b, T: Stow<'b>> Stow<'b, [T]> for [T][src]

impl<'b, T: Copy + Stow<'b>> Stow<'b, [T]> for [T][src]

Loading content...