diff options
author | 2019-08-30 02:59:53 +0200 | |
---|---|---|
committer | 2019-08-30 02:59:53 +0200 | |
commit | 072cdab48903863f8f5ebaea19bd537428197f51 (patch) | |
tree | 580fb9effb18d3f9c49e0042d20a270e7adbb3d3 /README.md | |
parent | dc4ce4d3b953aa41ff8d29c35b63c96327a2eb77 (diff) | |
download | iced-072cdab48903863f8f5ebaea19bd537428197f51.tar.gz iced-072cdab48903863f8f5ebaea19bd537428197f51.tar.bz2 iced-072cdab48903863f8f5ebaea19bd537428197f51.zip |
Write documentation example for `Element::map`
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -88,7 +88,7 @@ use iced::{Button, Column, Text}; use iced_wgpu::Renderer; // Iced is renderer-agnostic! We need to bring our own! impl Counter { - fn view(&mut self) -> Column<Message, Renderer> { + pub fn view(&mut self) -> Column<Message, Renderer> { // We use a column: a simple vertical layout Column::new() .push( @@ -118,7 +118,7 @@ __state__ accordingly in our __update logic__: impl Counter { // ... - fn update(&mut self, message: Message) { + pub fn update(&mut self, message: Message) { match message { Message::IncrementPressed => { self.value += 1; |