pub enum ImageData {
Color(Arc<ColorImage>),
Font(FontImage),
}
Expand description
An image stored in RAM.
To load an image file, see ColorImage::from_rgba_unmultiplied
.
In order to paint the image on screen, you first need to convert it to
See also: ColorImage
, FontImage
.
Variants§
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ImageData
impl<'de> Deserialize<'de> for ImageData
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ImageData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ImageData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ColorImage> for ImageData
impl From<ColorImage> for ImageData
Source§fn from(image: ColorImage) -> ImageData
fn from(image: ColorImage) -> ImageData
Converts to this type from the input type.
Source§impl Serialize for ImageData
impl Serialize for ImageData
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ImageData
Auto Trait Implementations§
impl Freeze for ImageData
impl RefUnwindSafe for ImageData
impl Send for ImageData
impl Sync for ImageData
impl Unpin for ImageData
impl UnwindSafe for ImageData
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