pub trait ByteStorage: Default {
// Required methods
fn reset(&mut self);
fn bytes(&self) -> &[u8] ⓘ;
fn bytes_count(&self) -> usize;
fn write_bytes(&mut self, bytes: &[u8]);
fn write_zeros(&mut self, count: usize);
}
Expand description
A trait for any storage suitable to store bytes for uniforms.
Required Methods§
Sourcefn bytes_count(&self) -> usize
fn bytes_count(&self) -> usize
Returns total number of bytes that is currently in the storage.
Sourcefn write_bytes(&mut self, bytes: &[u8])
fn write_bytes(&mut self, bytes: &[u8])
Writes the given number of bytes to the storage.
Sourcefn write_zeros(&mut self, count: usize)
fn write_zeros(&mut self, count: usize)
Writes the given number of zero bytes to the storage.
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.