pub trait IsBuffer: Sized {
type Resources<'a>: Clone;
// Required methods
fn buffer_create(resources: Self::Resources<'_>, capacity: usize) -> Self;
fn buffer_copy(
resources: Self::Resources<'_>,
source_buffer: &Self,
destination_buffer: &Self,
);
fn buffer_write<U: Iterator<Item = SlabUpdate>>(
&self,
resources: Self::Resources<'_>,
updates: U,
);
}Required Associated Typesยง
Required Methodsยง
Sourcefn buffer_create(resources: Self::Resources<'_>, capacity: usize) -> Self
fn buffer_create(resources: Self::Resources<'_>, capacity: usize) -> Self
Create a new buffer with the given capacity.
Sourcefn buffer_copy(
resources: Self::Resources<'_>,
source_buffer: &Self,
destination_buffer: &Self,
)
fn buffer_copy( resources: Self::Resources<'_>, source_buffer: &Self, destination_buffer: &Self, )
Copy the contents of one buffer into another at index 0.
Sourcefn buffer_write<U: Iterator<Item = SlabUpdate>>(
&self,
resources: Self::Resources<'_>,
updates: U,
)
fn buffer_write<U: Iterator<Item = SlabUpdate>>( &self, resources: Self::Resources<'_>, updates: U, )
Write updates to the buffer.
Dyn Compatibilityยง
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.