[][src]Trait lock_free_freelist::Reusable

pub trait Reusable {
    pub fn set_new_val(&mut self, other: Self);
}

This trait is required by Deref Target of a type implementing SmartPointer.

When a free list reuses an element, the old contents are still there. The definition of set_new_val should use the new instance of type Self to set it to new contents.

#[derive(Reusable)] defines set_new_val to just perform a std::mem::replace to set it to new contents

Required methods

pub fn set_new_val(&mut self, other: Self)[src]

Contents of other should be assigned to self in whatever way the implementer finds efficient.

Loading content...

Implementations on Foreign Types

impl Reusable for u8[src]

impl Reusable for i8[src]

impl Reusable for u16[src]

impl Reusable for i16[src]

impl Reusable for i32[src]

impl Reusable for u32[src]

impl Reusable for i64[src]

impl Reusable for u64[src]

impl Reusable for i128[src]

impl Reusable for u128[src]

impl Reusable for String[src]

impl<T> Reusable for Option<T>[src]

impl<T, E> Reusable for Result<T, E>[src]

Loading content...

Implementors

Loading content...