summaryrefslogtreecommitdiffstats
path: root/native/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-12-04 03:55:33 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-12-04 03:55:33 +0100
commit4293dcb2540144cc69a9f1370103bb780eca69f3 (patch)
treeb47a014a0f3b09f005c710fb4df6795e716931bc /native/src
parent1747eb2745d032275dff652aed2c4d8730d377e6 (diff)
downloadiced-4293dcb2540144cc69a9f1370103bb780eca69f3.tar.gz
iced-4293dcb2540144cc69a9f1370103bb780eca69f3.tar.bz2
iced-4293dcb2540144cc69a9f1370103bb780eca69f3.zip
Rename `image::Handle::from_bytes` to `from_memory`
Also, replace `image` example with a new `pokedex` example using the PokéAPI.
Diffstat (limited to 'native/src')
-rw-r--r--native/src/widget/image.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/native/src/widget/image.rs b/native/src/widget/image.rs
index 1b3964d7..0d73fdb0 100644
--- a/native/src/widget/image.rs
+++ b/native/src/widget/image.rs
@@ -126,8 +126,11 @@ impl Handle {
/// Creates an image [`Handle`] containing the image data directly.
///
+ /// This is useful if you already have your image loaded in-memory, maybe
+ /// because you downloaded or generated it procedurally.
+ ///
/// [`Handle`]: struct.Handle.html
- pub fn from_bytes(bytes: Vec<u8>) -> Handle {
+ pub fn from_memory(bytes: Vec<u8>) -> Handle {
Self::from_data(Data::Bytes(bytes))
}