pub struct MultiResImage {
pub original_size: [usize; 2],
pub thumbnail: Option<Arc<Vec<u8>>>,
pub mid_res: Option<Arc<Vec<u8>>>,
pub full_res: Option<Arc<Vec<u8>>>,
pub current_quality: ImageQuality,
pub loading_full: bool,
}Expand description
Multi-resolution image set for a single slice
Fields§
§original_size: [usize; 2]Original image dimensions [width, height]
thumbnail: Option<Arc<Vec<u8>>>Thumbnail (256×256) - always available
mid_res: Option<Arc<Vec<u8>>>Mid-resolution (512×512) - available based on config
full_res: Option<Arc<Vec<u8>>>Full resolution - lazy loaded
current_quality: ImageQualityCurrent highest quality available
loading_full: boolWhether full-res is being loaded
Implementations§
Source§impl MultiResImage
impl MultiResImage
Sourcepub fn at_quality(&self, quality: ImageQuality) -> Option<Arc<Vec<u8>>>
pub fn at_quality(&self, quality: ImageQuality) -> Option<Arc<Vec<u8>>>
Get image at specific quality level
Sourcepub fn has_quality(&self, quality: ImageQuality) -> bool
pub fn has_quality(&self, quality: ImageQuality) -> bool
Check if we have the requested quality
Sourcepub fn memory_bytes(&self) -> usize
pub fn memory_bytes(&self) -> usize
Get memory usage in bytes
Trait Implementations§
Source§impl Clone for MultiResImage
impl Clone for MultiResImage
Source§fn clone(&self) -> MultiResImage
fn clone(&self) -> MultiResImage
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for MultiResImage
impl RefUnwindSafe for MultiResImage
impl Send for MultiResImage
impl Sync for MultiResImage
impl Unpin for MultiResImage
impl UnwindSafe for MultiResImage
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