Trait ts_mem_pool::arc_recycled::Recycle[][src]

pub trait Recycle {
    fn recycle(&mut self);
}

This trait is required to use a type in the memory pool

Required Methods

Render data of the object usable

Example

extern crate a_memory_pool;
use a_memory_pool::*;

struct MyType {
    /* Some fields */
}

impl MyType {
    fn reset(&mut self) {
        /* Do Something */
    }
}

impl Recycle for MyType {
    fn recycle(&mut self) {
        self.reset();
    }
}

Implementations on Foreign Types

impl<T> Recycle for Vec<T>
[src]

Implementors