pub enum ImageInfoLoader {
File(File),
Texture(Texture),
}
Expand description
An API to load image information.
Variants§
Implementations§
source§impl ImageInfoLoader
impl ImageInfoLoader
sourceasync fn into_first_frame(self) -> Option<Frame>
async fn into_first_frame(self) -> Option<Frame>
Load the first frame for this source.
We need to load the first frame of an image so that EXIF rotation is applied and we get the proper dimensions.
sourcepub async fn load_info(self) -> BaseImageInfo
pub async fn load_info(self) -> BaseImageInfo
Load the information for this image.
sourcepub async fn load_info_and_thumbnail(
self,
filesize: Option<u32>,
) -> (BaseImageInfo, Option<Thumbnail>)
pub async fn load_info_and_thumbnail( self, filesize: Option<u32>, ) -> (BaseImageInfo, Option<Thumbnail>)
Load the information for this image and try to generate a thumbnail given the filesize of the original image.
Trait Implementations§
source§impl From<File> for ImageInfoLoader
impl From<File> for ImageInfoLoader
Auto Trait Implementations§
impl Freeze for ImageInfoLoader
impl RefUnwindSafe for ImageInfoLoader
impl Send for ImageInfoLoader
impl Sync for ImageInfoLoader
impl Unpin for ImageInfoLoader
impl UnwindSafe for ImageInfoLoader
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
source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more