Skip to main content

ImageProp

Enum ImageProp 

Source
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 Clone for ImageProp

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ImageProp

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl HostProps for ImageProp

Source§

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.
Source§

fn reset(&self) -> Option<Self>

This prop at its default (what clearing it from JS sets); None for the props the runtime sets once.
Source§

fn same_kind(&self, other: &Self) -> bool

Whether self and other set the same property.
Source§

fn specs(types: &mut TsTypes, out: &mut Vec<HostPropSpec>)

The props, for the generated TypeScript.
Source§

impl PartialEq for ImageProp

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ImageProp

Auto Trait Implementations§

§

impl !RefUnwindSafe for ImageProp

§

impl !UnwindSafe for ImageProp

§

impl Forget for ImageProp

§

impl Freeze for ImageProp
where *const ArcInner<str> is !null: Freeze, PhantomData<ArcInner<str>>: Freeze, *const ArcInner<dyn AsRef<[u8]> + Sync + Send> is !null: Freeze, PhantomData<ArcInner<dyn AsRef<[u8]> + Sync + Send>>: Freeze, *const ArcInner<Rgba> is !null: Freeze, PhantomData<ArcInner<Rgba>>: Freeze,

§

impl Move for ImageProp

§

impl Send for ImageProp
where Arc<str>: Send, Arc<dyn AsRef<[u8]> + Sync + Send>: Send, Arc<Rgba>: Send,

§

impl Sync for ImageProp
where Arc<str>: Sync, Arc<dyn AsRef<[u8]> + Sync + Send>: Sync, Arc<Rgba>: Sync,

§

impl Unpin for ImageProp
where Arc<str>: Unpin, Arc<dyn AsRef<[u8]> + Sync + Send>: Unpin, Arc<Rgba>: Unpin,

§

impl UnsafeUnpin for ImageProp
where *const ArcInner<str> is !null: UnsafeUnpin, PhantomData<ArcInner<str>>: UnsafeUnpin, *const ArcInner<dyn AsRef<[u8]> + Sync + Send> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn AsRef<[u8]> + Sync + Send>>: UnsafeUnpin, *const ArcInner<Rgba> is !null: UnsafeUnpin, PhantomData<ArcInner<Rgba>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.