Skip to main content

IBatchStreamPoolItems

Trait IBatchStreamPoolItems 

Source
pub trait IBatchStreamPoolItems<T>: Send + Sync {
    // Required method
    fn create_item(&self) -> T;

    // Provided methods
    fn clear_item(&self, _item: &mut T) { ... }
    fn destroy_item(&self, _item: T) { ... }
}
Expand description

How the items of a BatchStreamPoolBase are created, cleared and destroyed (the abstract and virtual members of the C# base class).

Required Methods§

Source

fn create_item(&self) -> T

Creates a new item; called when the pool has none to hand out.

Provided Methods§

Source

fn clear_item(&self, _item: &mut T)

Clears an item that is being returned to the pool.

Source

fn destroy_item(&self, _item: T)

Destroys an item the pool does not keep.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§