Enum i_slint_core::graphics::ImageCacheKey
source · [−]#[repr(C)]
pub enum ImageCacheKey {
Invalid,
Path(SharedString),
EmbeddedData(usize),
}Expand description
ImageCacheKey encapsulates the different ways of indexing images in the cache of decoded images.
Variants
Invalid
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(SharedString)
The image is identified by its path on the file system.
EmbeddedData(usize)
The image is identified by the static address of its encoded data.
Implementations
sourceimpl 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
sourceimpl Clone for ImageCacheKey
impl Clone for ImageCacheKey
sourcefn clone(&self) -> ImageCacheKey
fn clone(&self) -> ImageCacheKey
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for ImageCacheKey
impl Debug for ImageCacheKey
sourceimpl Hash for ImageCacheKey
impl Hash for ImageCacheKey
sourceimpl PartialEq<ImageCacheKey> for ImageCacheKey
impl PartialEq<ImageCacheKey> for ImageCacheKey
sourcefn eq(&self, other: &ImageCacheKey) -> bool
fn eq(&self, other: &ImageCacheKey) -> bool
impl Eq for ImageCacheKey
impl StructuralEq for ImageCacheKey
impl StructuralPartialEq for ImageCacheKey
Auto Trait Implementations
impl RefUnwindSafe for ImageCacheKey
impl Send for ImageCacheKey
impl !Sync for ImageCacheKey
impl Unpin for ImageCacheKey
impl UnwindSafe for ImageCacheKey
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more