pub enum ImageProp {
Placeholder(Option<ImageSource>),
BlurRadius(Points),
FadeDuration(Option<f32>),
SvgCurrentColor(bool),
}Expand description
How an <image> is shown, besides its source.
Variants§
Placeholder(Option<ImageSource>)
placeholder: shown until src has loaded (best a local asset).
BlurRadius(Points)
blurRadius: blurs the image by this radius in points (decoded once, off
the main thread).
FadeDuration(Option<f32>)
fadeDuration: how long a loaded image fades in, in milliseconds
(default: the platform’s, 0 on iOS and 300 on Android, like React
Native).
SvgCurrentColor(bool)
Set by svg() where the platform draws the SVG itself (the web): its
currentColor is the element’s text color
(crate::mount::ImageOptions::current_color).
Trait Implementations§
Source§impl HostProps for ImageProp
impl HostProps for ImageProp
Source§fn decode<I: HostInput>(
name: &str,
input: &I,
cx: &mut HostCx,
) -> Option<Option<Self>>
fn decode<I: HostInput>( name: &str, input: &I, cx: &mut HostCx, ) -> Option<Option<Self>>
The prop JS name
name sets with input: None for a name that is
not one of these props, Some(None) when nothing is to be set.impl StructuralPartialEq for ImageProp
Auto Trait Implementations§
impl !RefUnwindSafe for ImageProp
impl !UnwindSafe for ImageProp
impl Forget for ImageProp
impl Freeze for ImageProp
impl Move for ImageProp
impl Send for ImageProp
impl Sync for ImageProp
impl Unpin for ImageProp
impl UnsafeUnpin for ImagePropwhere
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
*const ArcInner<dyn AsRef<[u8]> + Send + Sync> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn AsRef<[u8]> + Send + Sync>>: UnsafeUnpin,
*const ArcInner<Rgba> is !null: UnsafeUnpin,
PhantomData<ArcInner<Rgba>>: UnsafeUnpin,
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