1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
use std::future::Future;
use crate::{
foundation::Key,
painting::{
DecoderCallback, ImageCache, ImageCacheStatus, ImageConfiguration, ImageErrorListener,
ImageProvider, ImageStream, ImageStreamCompleter,
},
services::AssetBundle,
};
use super::AssetBundleImageProvider;
pub struct ExactAssetImage {
pub asset_name: String,
pub bundle: Option<Box<dyn AssetBundle>>,
pub key_name: String,
pub package: Option<String>,
pub scale: f64,
}
impl ExactAssetImage {
pub fn new(
asset_name: String,
scale: Option<f64>,
bundle: Option<Box<dyn AssetBundle>>,
package: Option<String>,
) -> Self {
todo!()
}
}
impl AssetBundleImageProvider for ExactAssetImage {
fn load(key: super::AssetBundleImageKey, decode: Box<DecoderCallback>) -> ImageStreamCompleter {
todo!()
}
fn obtain_key(
configuration: ImageConfiguration,
) -> Box<dyn Future<Output = super::AssetBundleImageKey>> {
todo!()
}
fn resolve_stream_for_key(
configuration: ImageConfiguration,
stream: ImageStream,
key: super::AssetBundleImageKey,
handle_error: Option<Box<ImageErrorListener>>,
) {
todo!()
}
}
impl ImageProvider for ExactAssetImage {
fn create_stream(&self, configuration: ImageConfiguration) -> ImageStream {
todo!()
}
fn evict(
&self,
cache: Option<ImageCache>,
configuration: ImageConfiguration,
) -> Box<dyn Future<Output = bool>> {
todo!()
}
fn load(&self, key: Key, decode: Box<DecoderCallback>) -> ImageStreamCompleter {
todo!()
}
fn obtain_cache_status(
&self,
configuration: ImageConfiguration,
handle_error: Option<Box<ImageErrorListener>>,
) -> Box<dyn Future<Output = Option<ImageCacheStatus>>> {
todo!()
}
fn obtain_key(&self, configuration: ImageConfiguration) -> Box<dyn Future<Output = Key>> {
todo!()
}
fn resolve(&self, configuration: ImageConfiguration) -> ImageStream {
todo!()
}
fn resolve_stream_for_key(
&self,
configuration: ImageConfiguration,
stream: ImageStream,
key: Key,
handle_error: Option<Box<ImageErrorListener>>,
) {
todo!()
}
}