[−][src]Enum polyhorn_ios::assets::ImageSource
An image source describes the source of an image that can be passed to e.g. the Image component. An image source can either be a placeholder, an Asset or a Bytes (3rd party crate) object.
Variants
If you're loading a remote image, you might want to show a placeholder instead. The placeholder is entirely transparent (unless you give the containing component an opaque background color) but does have a size. This size is subsequently used in calculating the layout.
The benefit of this is that when the image is eventually completely loaded and the component re-renders to show that image, the rest of the layout will not change because it already anticipated the correct size of the image.
Asset(ImageAsset)
This image source is backed by a local asset that is included in a Polyhorn package.
Bytes(Bytes)
This image source is backed by an PNG-encoded buffer.
Trait Implementations
impl Clone for ImageSource
[src]
fn clone(&self) -> ImageSource
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl From<Bytes> for ImageSource
[src]
fn from(bytes: Bytes) -> ImageSource
[src]
impl From<ImageAsset> for ImageSource
[src]
fn from(asset: ImageAsset) -> ImageSource
[src]
impl PartialEq<ImageSource> for ImageSource
[src]
fn eq(&self, other: &ImageSource) -> bool
[src]
fn ne(&self, other: &ImageSource) -> bool
[src]
impl StructuralPartialEq for ImageSource
[src]
Auto Trait Implementations
impl RefUnwindSafe for ImageSource
impl Send for ImageSource
impl Sync for ImageSource
impl Unpin for ImageSource
impl UnwindSafe for ImageSource
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
[src]
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into(self) -> D
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AsAny for T where
T: Any,
[src]
T: Any,
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
fn type_name(&self) -> &'static str
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> ConvertInto<U> for T where
U: ConvertFrom<T>,
[src]
U: ConvertFrom<T>,
fn convert_into(self) -> U
[src]
fn convert_unclamped_into(self) -> U
[src]
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,