Rename image::Handle::from_bytes to from_memory
Also, replace `image` example with a new `pokedex` example using the PokéAPI.
This commit is contained in:
parent
1747eb2745
commit
4293dcb254
4 changed files with 236 additions and 203 deletions
|
|
@ -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))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue