Struct epaint::textures::TextureMeta
source · 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
source§fn eq(&self, other: &TextureMeta) -> bool
fn eq(&self, other: &TextureMeta) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for TextureMeta
impl StructuralEq for TextureMeta
impl StructuralPartialEq for TextureMeta
Auto Trait Implementations§
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