pub struct FileImage {
pub path: PathBuf,
pub scale: f64,
}Expand description
Decodes the image at a path. Flutter FileImage.
The bytes are read through the platform’s file system
(Platform::files); the cache names the image by its path
and scale.
Fields§
§path: PathBufThe path the image is read from.
scale: f64Linear pixels per logical point in the decoded image.
Implementations§
Trait Implementations§
Source§impl ImageProvider for FileImage
impl ImageProvider for FileImage
Source§fn key(&self, _configuration: &ImageConfiguration) -> ImageCacheKey
fn key(&self, _configuration: &ImageConfiguration) -> ImageCacheKey
What names this image in the cache. Flutter
obtainKey. Read moreSource§fn load_image(
&self,
app: &mut App,
key: &ImageCacheKey,
) -> Retained<Handle<ImageStreamCompleter>>
fn load_image( &self, app: &mut App, key: &ImageCacheKey, ) -> Retained<Handle<ImageStreamCompleter>>
Starts decoding, answering with the completer that will carry the frame. Flutter
loadImage. Read moreSource§fn resolve(
&self,
app: &mut App,
configuration: &ImageConfiguration,
) -> Retained<Handle<ImageStream>>
fn resolve( &self, app: &mut App, configuration: &ImageConfiguration, ) -> Retained<Handle<ImageStream>>
The stream for this image, sharing whatever the cache already has. Flutter
resolve.impl StructuralPartialEq for FileImage
Auto Trait Implementations§
impl Forget for FileImage
impl Freeze for FileImage
impl Move for FileImage
impl RefUnwindSafe for FileImage
impl Send for FileImagewhere
RawVecInner: Send,
impl Sync for FileImagewhere
RawVecInner: Sync,
impl Unpin for FileImage
impl UnsafeUnpin for FileImage
impl UnwindSafe for FileImagewhere
RawVecInner: UnwindSafe,
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