#[repr(u8)]pub enum ImageCacheKey {
Invalid = 0,
Path(CachedPath),
EmbeddedData(usize),
}
Expand description
ImageCacheKey encapsulates the different ways of indexing images in the cache of decoded images.
Variants§
Invalid = 0
This variant indicates that no image cache key can be created for the image. For example this is the case for programmatically created images.
Path(CachedPath)
The image is identified by its path on the file system and the last modification time stamp.
EmbeddedData(usize)
The image is identified by the static address of its encoded data.
Implementations§
Source§impl ImageCacheKey
impl ImageCacheKey
Sourcepub fn new(resource: &ImageInner) -> Option<Self>
pub fn new(resource: &ImageInner) -> Option<Self>
Returns a new cache key if decoded image data can be stored in image cache for the given ImageInner.
Sourcepub fn from_embedded_image_data(data: &'static [u8]) -> Self
pub fn from_embedded_image_data(data: &'static [u8]) -> Self
Returns a cache key for static embedded image data.
Trait Implementations§
Source§impl Clone for ImageCacheKey
impl Clone for ImageCacheKey
Source§fn clone(&self) -> ImageCacheKey
fn clone(&self) -> ImageCacheKey
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 ImageCacheKey
impl Debug for ImageCacheKey
Source§impl Hash for ImageCacheKey
impl Hash for ImageCacheKey
Source§impl PartialEq for ImageCacheKey
impl PartialEq for ImageCacheKey
impl Eq for ImageCacheKey
impl StructuralPartialEq for ImageCacheKey
Auto Trait Implementations§
impl Freeze for ImageCacheKey
impl RefUnwindSafe for ImageCacheKey
impl Send for ImageCacheKey
impl !Sync for ImageCacheKey
impl Unpin for ImageCacheKey
impl UnwindSafe for ImageCacheKey
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