pub struct ImageData {
pub source: String,
pub object_fit: u8,
pub object_position: [f32; 2],
pub opacity: f32,
pub border_radius: f32,
pub tint: [f32; 4],
pub filter: [f32; 8],
pub loading_strategy: u8,
pub placeholder_type: u8,
pub placeholder_color: [f32; 4],
}Expand description
Image data for rendering
Fields§
§source: StringImage source (file path, URL, or base64 data)
object_fit: u8Object-fit mode (0=cover, 1=contain, 2=fill, 3=scale-down, 4=none)
object_position: [f32; 2]Object position (x: 0.0-1.0, y: 0.0-1.0)
opacity: f32Opacity (0.0 - 1.0)
border_radius: f32Border radius for rounded corners
tint: [f32; 4]Tint color [r, g, b, a]
filter: [f32; 8]Filter: [grayscale, sepia, brightness, contrast, saturate, hue_rotate, invert, blur]
loading_strategy: u8Loading strategy: 0 = Eager (default), 1 = Lazy
placeholder_type: u8Placeholder type: 0 = None, 1 = Color, 2 = Image, 3 = Skeleton
placeholder_color: [f32; 4]Placeholder color [r, g, b, a]
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ImageData
impl RefUnwindSafe for ImageData
impl Send for ImageData
impl Sync for ImageData
impl Unpin for ImageData
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.