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§
Sourcefn create_item(&self) -> T
fn create_item(&self) -> T
Creates a new item; called when the pool has none to hand out.
Provided Methods§
Sourcefn clear_item(&self, _item: &mut T)
fn clear_item(&self, _item: &mut T)
Clears an item that is being returned to the pool.
Sourcefn destroy_item(&self, _item: T)
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".