pub struct TextureMeta {
pub name: String,
pub size: [usize; 2],
pub bytes_per_pixel: usize,
pub retain_count: usize,
pub options: TextureOptions,
}
Expand description
Meta-data about an allocated texture.
Fields§
§name: String
A human-readable name useful for debugging.
size: [usize; 2]
width x height
bytes_per_pixel: usize
4 or 1
retain_count: usize
Free when this reaches zero.
options: TextureOptions
The texture filtering mode to use when rendering.
Implementations§
Source§impl TextureMeta
impl TextureMeta
Sourcepub fn bytes_used(&self) -> usize
pub fn bytes_used(&self) -> usize
Size in bytes.
width x height x Self::bytes_per_pixel
.
Trait Implementations§
Source§impl Clone for TextureMeta
impl Clone for TextureMeta
Source§fn clone(&self) -> TextureMeta
fn clone(&self) -> TextureMeta
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TextureMeta
impl Debug for TextureMeta
Source§impl PartialEq for TextureMeta
impl PartialEq for TextureMeta
impl Eq for TextureMeta
impl StructuralPartialEq for TextureMeta
Auto Trait Implementations§
impl Freeze for TextureMeta
impl RefUnwindSafe for TextureMeta
impl Send for TextureMeta
impl Sync for TextureMeta
impl Unpin for TextureMeta
impl UnwindSafe for TextureMeta
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more