pub struct ImageLoader;Expand description
Decodes a raster image into ImageData.
The decoded pixels are published twice over one allocation: as rgba for
consumers that read pixels directly, and as a peniko::Blob whose
identity keys a renderer’s image upload cache across frames.
Trait Implementations§
Source§impl AssetLoader for ImageLoader
impl AssetLoader for ImageLoader
Source§fn extensions(&self) -> &[&str]
fn extensions(&self) -> &[&str]
File extensions this loader claims, lowercase and without the dot.
Registering a loader claims every extension it names; a later
registration wins over an earlier one for the same extension.
Source§fn kind(&self) -> AssetKind
fn kind(&self) -> AssetKind
The family this loader produces. The object-safe stand-in for Bevy’s
associated
type Asset.Source§fn load(&self, ctx: &LoadContext<'_>) -> Result<LoadedAsset, LoadErrorKind>
fn load(&self, ctx: &LoadContext<'_>) -> Result<LoadedAsset, LoadErrorKind>
Loads one asset. Returning
Err caches the failure against the path
and attaches a failure component to every entity waiting on it.Auto Trait Implementations§
impl Freeze for ImageLoader
impl RefUnwindSafe for ImageLoader
impl Send for ImageLoader
impl Sync for ImageLoader
impl Unpin for ImageLoader
impl UnsafeUnpin for ImageLoader
impl UnwindSafe for ImageLoader
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.