Trait swimmer::Recyclable[][src]

pub trait Recyclable: Send {
    fn new() -> Self
    where
        Self: Sized
;
fn recycle(&mut self); }

Indicates that an object can be used inside a Pool.

Types implementing this trait must be Send, since the pool itself can be used across threads.

Required methods

fn new() -> Self where
    Self: Sized
[src]

Creates a new value of this type.

fn recycle(&mut self)[src]

Resets this object, allowing it to be reused in the future without retaining its old state.

Loading content...

Implementations on Foreign Types

impl Recyclable for String[src]

impl<T> Recyclable for Vec<T> where
    T: Send
[src]

impl<T> Recyclable for VecDeque<T> where
    T: Send
[src]

impl<T> Recyclable for LinkedList<T> where
    T: Send
[src]

impl<K, V> Recyclable for HashMap<K, V> where
    K: Eq + Hash + Send,
    V: Send
[src]

impl<T> Recyclable for HashSet<T> where
    T: Eq + Hash + Send
[src]

impl<K, V> Recyclable for BTreeMap<K, V> where
    K: Ord + Send,
    V: Send
[src]

impl<T> Recyclable for BTreeSet<T> where
    T: Ord + Send
[src]

impl<T> Recyclable for BinaryHeap<T> where
    T: Ord + Send
[src]

impl Recyclable for u8[src]

impl Recyclable for u16[src]

impl Recyclable for u32[src]

impl Recyclable for u64[src]

impl Recyclable for i8[src]

impl Recyclable for i16[src]

impl Recyclable for i32[src]

impl Recyclable for i64[src]

Loading content...

Implementors

Loading content...