Struct gooey::core::assets::Image [−][src]
pub struct Image {
pub asset: Asset,
// some fields omitted
}
Expand description
A loadable image asset.
Fields
asset: Asset
The asset definition for this image.
Implementations
Loads the image. When loaded successfully, on_loaded
will be invoked.
If an error occurs while loading, on_error
will be invoked.
Sets the internal frontend data for this image. Should not be used outside of developing a frontend.
pub fn map_data<R, F>(&self, callback: F) -> R where
F: FnOnce(Option<&mut (dyn FrontendImage + 'static)>) -> R,
pub fn map_data<R, F>(&self, callback: F) -> R where
F: FnOnce(Option<&mut (dyn FrontendImage + 'static)>) -> R,
Maps the frontend data into callback
returning the result of the
function. This is generally only useful when developing a frontend.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Image
impl !UnwindSafe for Image
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
Mutably borrows from an owned value. Read more
Convert into T with values clamped to the color defined bounds Read more
Convert into T. The resulting color might be invalid in its color space Read more
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
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more