pub enum ImageAsset {
Embedded(Image),
Loaded(LoadedImage),
Animated(Rc<LoadedAnimation>),
}Expand description
The image value accepted by layout, rendering, and playback.
Variants§
Implementations§
Source§impl ImageAsset
impl ImageAsset
pub fn size(&self) -> [u32; 2]
pub fn frame_count(&self) -> usize
pub fn frame(&self, index: usize) -> Self
pub fn with_nine_slice(self, edges: NineSlice) -> Result<Self, InvalidNineSlice>
pub fn pixels(&self) -> Option<ImagePixels<'_>>
Trait Implementations§
Source§impl Clone for ImageAsset
impl Clone for ImageAsset
Source§impl Debug for ImageAsset
impl Debug for ImageAsset
Source§impl Default for ImageAsset
impl Default for ImageAsset
impl Eq for ImageAsset
Source§impl From<Image> for ImageAsset
impl From<Image> for ImageAsset
Auto Trait Implementations§
impl !Send for ImageAsset
impl !Sync for ImageAsset
impl Forget for ImageAsset
impl Freeze for ImageAsset
impl Move for ImageAsset
impl RefUnwindSafe for ImageAsset
impl Unpin for ImageAsset
impl UnsafeUnpin for ImageAsset
impl UnwindSafe for ImageAsset
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