pub struct ImageAsset { /* private fields */ }Expand description
Static-typed asset for images.
Trait Implementations§
Source§impl Asset for ImageAsset
impl Asset for ImageAsset
Source§fn package(&self) -> &str
fn package(&self) -> &str
This function returns the name of the package that an asset originates
from. Different packages are allowed to have assets with an identical
name. Conversely, packages cannot access assets that originate from a
different package. If you want to know the name of the package that an
asset originated from, you can use this function.
Source§fn name(&self) -> &str
fn name(&self) -> &str
This function returns the name of this asset (without any file
extension). Assets must be unique regardless of their suffix /
extension. For multi-DPI assets, the name does never include the DPI
suffix. The
asset!(...) macro does not accept providing a name that
includes a DPI suffix anyway.Source§impl Clone for ImageAsset
impl Clone for ImageAsset
Source§fn clone(&self) -> ImageAsset
fn clone(&self) -> ImageAsset
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 ImageAsset
impl Debug for ImageAsset
Source§impl From<ImageAsset> for ImageSource
impl From<ImageAsset> for ImageSource
Source§fn from(asset: ImageAsset) -> Self
fn from(asset: ImageAsset) -> Self
Converts to this type from the input type.
Source§impl ImageQuery for ImageAsset
impl ImageQuery for ImageAsset
Source§impl PartialEq for ImageAsset
impl PartialEq for ImageAsset
impl Copy for ImageAsset
impl Eq for ImageAsset
Auto Trait Implementations§
impl Freeze for ImageAsset
impl RefUnwindSafe for ImageAsset
impl Send for ImageAsset
impl Sync for ImageAsset
impl Unpin for ImageAsset
impl UnwindSafe for ImageAsset
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified
method
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford
method by default
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, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
Source§fn convert_into(self) -> U
fn convert_into(self) -> U
Convert into T with values clamped to the color defined bounds Read more
Source§fn convert_unclamped_into(self) -> U
fn convert_unclamped_into(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
Source§fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
Convert into T, returning ok if the color is inside of its defined range,
otherwise an
OutOfBounds error is returned which contains the unclamped color. Read more