pub enum ImageSource {
Asset(&'static GraphicAsset),
Texture(Texture2D),
}Expand description
Represents the source of image data for an element. Accepts static assets, runtime GPU textures, or procedural TinyVG scene graphs.
Variants§
Asset(&'static GraphicAsset)
Static asset: file path or embedded bytes (existing behavior).
Texture(Texture2D)
Pre-existing GPU texture handle (lightweight, Copy).
Implementations§
Trait Implementations§
Source§impl Clone for ImageSource
impl Clone for ImageSource
Source§fn clone(&self) -> ImageSource
fn clone(&self) -> ImageSource
Returns a duplicate 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 ImageSource
impl Debug for ImageSource
Source§impl From<&'static GraphicAsset> for ImageSource
impl From<&'static GraphicAsset> for ImageSource
Source§fn from(asset: &'static GraphicAsset) -> Self
fn from(asset: &'static GraphicAsset) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ImageSource
impl RefUnwindSafe for ImageSource
impl Send for ImageSource
impl Sync for ImageSource
impl Unpin for ImageSource
impl UnsafeUnpin for ImageSource
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