pub enum ImageSource {
File(PathBuf),
Pixels(Pixels),
}Expand description
What an Image shows.
Variants§
File(PathBuf)
An image file, decoded by the platform: PNG and JPEG everywhere, other formats where the platform reads them. It’s read when the source is set; a file that changes under the same path isn’t read again.
Pixels(Pixels)
Pixels the app has in memory.
Trait Implementations§
Source§impl Clone for ImageSource
impl Clone for ImageSource
Source§impl Debug for ImageSource
impl Debug for ImageSource
Source§impl IntoValue<ImageSource> for ImageSource
impl IntoValue<ImageSource> for ImageSource
fn into_value(self) -> Value<ImageSource>
Source§impl PartialEq for ImageSource
impl PartialEq for ImageSource
impl StructuralPartialEq for ImageSource
Auto Trait Implementations§
impl Forget for ImageSource
impl Freeze for ImageSource
impl Move for ImageSource
impl RefUnwindSafe for ImageSource
impl Send for ImageSource
impl Sync for ImageSource
impl Unpin for ImageSource
impl UnsafeUnpin for ImageSourcewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<[u8]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[u8]>>: UnsafeUnpin,
impl UnwindSafe for ImageSource
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