Unify Program definition in iced_program subcrate
This commit is contained in:
parent
ebfcb65841
commit
fd1101bd5f
66 changed files with 1862 additions and 1935 deletions
|
|
@ -8,7 +8,7 @@ use iced::window;
|
|||
use iced::{Element, Fill, Point, Rectangle, Renderer, Subscription, Theme};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::application("Arc - Iced", Arc::update, Arc::view)
|
||||
iced::application(Arc::default, Arc::update, Arc::view)
|
||||
.subscription(Arc::subscription)
|
||||
.theme(|_| Theme::Dark)
|
||||
.antialiasing(true)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use iced::widget::{button, container, horizontal_space, hover, right};
|
|||
use iced::{Element, Theme};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::application("Bezier Tool - Iced", Example::update, Example::view)
|
||||
iced::application(Example::default, Example::update, Example::view)
|
||||
.theme(|_| Theme::CatppuccinMocha)
|
||||
.antialiasing(true)
|
||||
.run()
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@ use iced::{Center, Element, Fill, FillPortion, Font, Task, Theme};
|
|||
pub fn main() -> iced::Result {
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
iced::application("Changelog Generator", Generator::update, Generator::view)
|
||||
iced::application(Generator::new, Generator::update, Generator::view)
|
||||
.theme(Generator::theme)
|
||||
.run_with(Generator::new)
|
||||
.run()
|
||||
}
|
||||
|
||||
enum Generator {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use iced::{Element, Font};
|
|||
const ICON_FONT: Font = Font::with_name("icons");
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::application("Checkbox - Iced", Example::update, Example::view)
|
||||
iced::application(Example::default, Example::update, Example::view)
|
||||
.font(include_bytes!("../fonts/icons.ttf").as_slice())
|
||||
.run()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ use iced::{
|
|||
pub fn main() -> iced::Result {
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
iced::application("Clock - Iced", Clock::update, Clock::view)
|
||||
iced::application(Clock::default, Clock::update, Clock::view)
|
||||
.subscription(Clock::subscription)
|
||||
.theme(Clock::theme)
|
||||
.antialiasing(true)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use std::ops::RangeInclusive;
|
|||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::application(
|
||||
"Color Palette - Iced",
|
||||
ColorPalette::default,
|
||||
ColorPalette::update,
|
||||
ColorPalette::view,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use iced::widget::{
|
|||
use iced::{Center, Element, Fill};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::run("Combo Box - Iced", Example::update, Example::view)
|
||||
iced::run(Example::update, Example::view)
|
||||
}
|
||||
|
||||
struct Example {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ use iced::Center;
|
|||
use iced::widget::{Column, button, column, text};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::run("A cool counter", Counter::update, Counter::view)
|
||||
iced::run(Counter::update, Counter::view)
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ use iced::widget::{center, column, slider, text};
|
|||
use iced::{Center, Color, Element, Shadow, Vector};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::run("Custom Quad - Iced", Example::update, Example::view)
|
||||
iced::run(Example::update, Example::view)
|
||||
}
|
||||
|
||||
struct Example {
|
||||
|
|
|
|||
|
|
@ -9,13 +9,9 @@ use iced::window;
|
|||
use iced::{Center, Color, Element, Fill, Subscription};
|
||||
|
||||
fn main() -> iced::Result {
|
||||
iced::application(
|
||||
"Custom Shader - Iced",
|
||||
IcedCubes::update,
|
||||
IcedCubes::view,
|
||||
)
|
||||
.subscription(IcedCubes::subscription)
|
||||
.run()
|
||||
iced::application(IcedCubes::default, IcedCubes::update, IcedCubes::view)
|
||||
.subscription(IcedCubes::subscription)
|
||||
.run()
|
||||
}
|
||||
|
||||
struct IcedCubes {
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ use iced::widget::{center, column, slider, text};
|
|||
use iced::{Center, Element};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::run("Custom Widget - Iced", Example::update, Example::view)
|
||||
iced::run(Example::update, Example::view)
|
||||
}
|
||||
|
||||
struct Example {
|
||||
|
|
|
|||
|
|
@ -7,12 +7,7 @@ use iced::widget::{Column, button, center, column, progress_bar, text};
|
|||
use iced::{Center, Element, Function, Right, Task};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::application(
|
||||
"Download Progress - Iced",
|
||||
Example::update,
|
||||
Example::view,
|
||||
)
|
||||
.run()
|
||||
iced::application(Example::default, Example::update, Example::view).run()
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
|
|||
|
|
@ -12,11 +12,11 @@ use std::path::{Path, PathBuf};
|
|||
use std::sync::Arc;
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::application("Editor - Iced", Editor::update, Editor::view)
|
||||
iced::application(Editor::new, Editor::update, Editor::view)
|
||||
.theme(Editor::theme)
|
||||
.font(include_bytes!("../fonts/icons.ttf").as_slice())
|
||||
.default_font(Font::MONOSPACE)
|
||||
.run_with(Editor::new)
|
||||
.run()
|
||||
}
|
||||
|
||||
struct Editor {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use iced::window;
|
|||
use iced::{Center, Element, Fill, Subscription, Task};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::application("Events - Iced", Events::update, Events::view)
|
||||
iced::application(Events::default, Events::update, Events::view)
|
||||
.subscription(Events::subscription)
|
||||
.exit_on_close_request(false)
|
||||
.run()
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use iced::window;
|
|||
use iced::{Center, Element, Task};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::application("Exit - Iced", Exit::update, Exit::view).run()
|
||||
iced::run(Exit::update, Exit::view)
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use iced::{
|
|||
};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::application("Ferris - Iced", Image::update, Image::view)
|
||||
iced::application(Image::default, Image::update, Image::view)
|
||||
.subscription(Image::subscription)
|
||||
.theme(|_| Theme::TokyoNight)
|
||||
.run()
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@ use iced::{
|
|||
use std::collections::HashMap;
|
||||
|
||||
fn main() -> iced::Result {
|
||||
iced::application("Gallery - Iced", Gallery::update, Gallery::view)
|
||||
iced::application(Gallery::new, Gallery::update, Gallery::view)
|
||||
.subscription(Gallery::subscription)
|
||||
.theme(Gallery::theme)
|
||||
.run_with(Gallery::new)
|
||||
.run()
|
||||
}
|
||||
|
||||
struct Gallery {
|
||||
|
|
|
|||
|
|
@ -14,16 +14,12 @@ use iced::{Center, Element, Fill, Function, Subscription, Task, Theme};
|
|||
pub fn main() -> iced::Result {
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
iced::application(
|
||||
"Game of Life - Iced",
|
||||
GameOfLife::update,
|
||||
GameOfLife::view,
|
||||
)
|
||||
.subscription(GameOfLife::subscription)
|
||||
.theme(|_| Theme::Dark)
|
||||
.antialiasing(true)
|
||||
.centered()
|
||||
.run()
|
||||
iced::application(GameOfLife::default, GameOfLife::update, GameOfLife::view)
|
||||
.subscription(GameOfLife::subscription)
|
||||
.theme(|_| Theme::Dark)
|
||||
.antialiasing(true)
|
||||
.centered()
|
||||
.run()
|
||||
}
|
||||
|
||||
struct GameOfLife {
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ use iced::widget::{center_x, center_y, column, scrollable};
|
|||
use rainbow::rainbow;
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::run("Custom 2D Geometry - Iced", |_: &mut _, _| {}, view)
|
||||
iced::run((), view)
|
||||
}
|
||||
|
||||
fn view(_state: &()) -> Element<'_, ()> {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use iced::{Center, Color, Element, Fill, Radians, Theme, color};
|
|||
pub fn main() -> iced::Result {
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
iced::application("Gradient - Iced", Gradient::update, Gradient::view)
|
||||
iced::application(Gradient::default, Gradient::update, Gradient::view)
|
||||
.style(Gradient::style)
|
||||
.transparent(true)
|
||||
.run()
|
||||
|
|
|
|||
|
|
@ -12,9 +12,10 @@ use iced::{
|
|||
};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::application(Layout::title, Layout::update, Layout::view)
|
||||
iced::application(Layout::default, Layout::update, Layout::view)
|
||||
.subscription(Layout::subscription)
|
||||
.theme(Layout::theme)
|
||||
.title(Layout::title)
|
||||
.run()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use std::collections::HashSet;
|
|||
use std::hash::Hash;
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::run("Lazy - Iced", App::update, App::view)
|
||||
iced::run(App::update, App::view)
|
||||
}
|
||||
|
||||
struct App {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use linear::Linear;
|
|||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::application(
|
||||
"Loading Spinners - Iced",
|
||||
LoadingSpinners::default,
|
||||
LoadingSpinners::update,
|
||||
LoadingSpinners::view,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use iced::{Center, Element};
|
|||
use loupe::loupe;
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::run("Loupe - Iced", Loupe::update, Loupe::view)
|
||||
iced::run(Loupe::update, Loupe::view)
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
|
|
|
|||
|
|
@ -18,11 +18,11 @@ use std::io;
|
|||
use std::sync::Arc;
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::application("Markdown - Iced", Markdown::update, Markdown::view)
|
||||
iced::application(Markdown::new, Markdown::update, Markdown::view)
|
||||
.font(icon::FONT)
|
||||
.subscription(Markdown::subscription)
|
||||
.theme(Markdown::theme)
|
||||
.run_with(Markdown::new)
|
||||
.run()
|
||||
}
|
||||
|
||||
struct Markdown {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use iced::{Bottom, Color, Element, Fill, Subscription, Task};
|
|||
use std::fmt;
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::application("Modal - Iced", App::update, App::view)
|
||||
iced::application(App::default, App::update, App::view)
|
||||
.subscription(App::subscription)
|
||||
.run()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,11 +10,12 @@ use iced::{
|
|||
use std::collections::BTreeMap;
|
||||
|
||||
fn main() -> iced::Result {
|
||||
iced::daemon(Example::title, Example::update, Example::view)
|
||||
iced::daemon(Example::new, Example::update, Example::view)
|
||||
.subscription(Example::subscription)
|
||||
.title(Example::title)
|
||||
.theme(Example::theme)
|
||||
.scale_factor(Example::scale_factor)
|
||||
.run_with(Example::new)
|
||||
.run()
|
||||
}
|
||||
|
||||
struct Example {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use std::collections::HashMap;
|
|||
pub fn main() -> iced::Result {
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
iced::application("Multitouch - Iced", Multitouch::update, Multitouch::view)
|
||||
iced::application(Multitouch::default, Multitouch::update, Multitouch::view)
|
||||
.antialiasing(true)
|
||||
.centered()
|
||||
.run()
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use iced::widget::{
|
|||
use iced::{Center, Color, Element, Fill, Size, Subscription};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::application("Pane Grid - Iced", Example::update, Example::view)
|
||||
iced::application(Example::default, Example::update, Example::view)
|
||||
.subscription(Example::subscription)
|
||||
.run()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ use iced::widget::{column, pick_list, scrollable, vertical_space};
|
|||
use iced::{Center, Element, Fill};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::run("Pick List - Iced", Example::update, Example::view)
|
||||
iced::run(Example::update, Example::view)
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
|
|
|
|||
|
|
@ -3,8 +3,9 @@ use iced::widget::{self, center, column, image, row, text};
|
|||
use iced::{Center, Element, Fill, Right, Task};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::application(Pokedex::title, Pokedex::update, Pokedex::view)
|
||||
.run_with(Pokedex::new)
|
||||
iced::application(Pokedex::new, Pokedex::update, Pokedex::view)
|
||||
.title(Pokedex::title)
|
||||
.run()
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use iced::widget::{
|
|||
};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::run("Progress Bar - Iced", Progress::update, Progress::view)
|
||||
iced::run(Progress::update, Progress::view)
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use std::ops::RangeInclusive;
|
|||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::application(
|
||||
"QR Code Generator - Iced",
|
||||
QRGenerator::default,
|
||||
QRGenerator::update,
|
||||
QRGenerator::view,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ use ::image::ColorType;
|
|||
fn main() -> iced::Result {
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
iced::application("Screenshot - Iced", Example::update, Example::view)
|
||||
iced::application(Example::default, Example::update, Example::view)
|
||||
.subscription(Example::subscription)
|
||||
.run()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ static SCROLLABLE_ID: LazyLock<scrollable::Id> =
|
|||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::application(
|
||||
"Scrollable - Iced",
|
||||
ScrollableDemo::default,
|
||||
ScrollableDemo::update,
|
||||
ScrollableDemo::view,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use std::fmt::Debug;
|
|||
|
||||
fn main() -> iced::Result {
|
||||
iced::application(
|
||||
"Sierpinski Triangle - Iced",
|
||||
SierpinskiEmulator::default,
|
||||
SierpinskiEmulator::update,
|
||||
SierpinskiEmulator::view,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ use iced::widget::{column, container, iced, slider, text, vertical_slider};
|
|||
use iced::{Center, Element, Fill};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::run("Slider - Iced", Slider::update, Slider::view)
|
||||
iced::run(Slider::update, Slider::view)
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ pub fn main() -> iced::Result {
|
|||
tracing_subscriber::fmt::init();
|
||||
|
||||
iced::application(
|
||||
"Solar System - Iced",
|
||||
SolarSystem::default,
|
||||
SolarSystem::update,
|
||||
SolarSystem::view,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use iced::widget::{button, center, column, row, text};
|
|||
use iced::{Center, Element, Subscription, Theme};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::application("Stopwatch - Iced", Stopwatch::update, Stopwatch::view)
|
||||
iced::application(Stopwatch::default, Stopwatch::update, Stopwatch::view)
|
||||
.subscription(Stopwatch::subscription)
|
||||
.theme(Stopwatch::theme)
|
||||
.run()
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use iced::widget::{
|
|||
use iced::{Center, Element, Fill, Subscription, Theme};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::application("Styling - Iced", Styling::update, Styling::view)
|
||||
iced::application(Styling::default, Styling::update, Styling::view)
|
||||
.subscription(Styling::subscription)
|
||||
.theme(Styling::theme)
|
||||
.run()
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ use iced::widget::{center, center_x, checkbox, column, svg};
|
|||
use iced::{Element, Fill, color};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::run("SVG - Iced", Tiger::update, Tiger::view)
|
||||
iced::run(Tiger::update, Tiger::view)
|
||||
}
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
|
|
|
|||
|
|
@ -2,12 +2,7 @@ use iced::widget::{button, center, column, text};
|
|||
use iced::{Element, Task, system};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::application(
|
||||
"System Information - Iced",
|
||||
Example::update,
|
||||
Example::view,
|
||||
)
|
||||
.run_with(Example::new)
|
||||
iced::application(Example::new, Example::update, Example::view).run()
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use std::cell::RefCell;
|
|||
pub fn main() -> iced::Result {
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
iced::application("The Matrix - Iced", TheMatrix::update, TheMatrix::view)
|
||||
iced::application(TheMatrix::default, TheMatrix::update, TheMatrix::view)
|
||||
.subscription(TheMatrix::subscription)
|
||||
.antialiasing(true)
|
||||
.run()
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use iced::{Center, Element, Fill, Subscription, Task};
|
|||
use toast::{Status, Toast};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::application("Toast - Iced", App::update, App::view)
|
||||
iced::application(App::default, App::update, App::view)
|
||||
.subscription(App::subscription)
|
||||
.run()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,11 +15,12 @@ pub fn main() -> iced::Result {
|
|||
#[cfg(not(target_arch = "wasm32"))]
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
iced::application(Todos::title, Todos::update, Todos::view)
|
||||
iced::application(Todos::new, Todos::update, Todos::view)
|
||||
.subscription(Todos::subscription)
|
||||
.title(Todos::title)
|
||||
.font(Todos::ICON_FONT)
|
||||
.window_size((500.0, 800.0))
|
||||
.run_with(Todos::new)
|
||||
.run()
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use iced::widget::tooltip::Position;
|
|||
use iced::widget::{button, center, container, tooltip};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::run("Tooltip - Iced", Tooltip::update, Tooltip::view)
|
||||
iced::run(Tooltip::update, Tooltip::view)
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ pub fn main() -> iced::Result {
|
|||
#[cfg(not(target_arch = "wasm32"))]
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
iced::application(Tour::title, Tour::update, Tour::view)
|
||||
iced::application(Tour::default, Tour::update, Tour::view)
|
||||
.title(Tour::title)
|
||||
.centered()
|
||||
.run()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use iced::widget::{center, text};
|
|||
use iced::{Element, Subscription};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::application("URL Handler - Iced", App::update, App::view)
|
||||
iced::application(App::default, App::update, App::view)
|
||||
.subscription(App::subscription)
|
||||
.run()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use iced::{Center, Element, Fill, Point, Rectangle, Renderer, Theme, Vector};
|
|||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::application(
|
||||
"Vectorial Text - Iced",
|
||||
VectorialText::default,
|
||||
VectorialText::update,
|
||||
VectorialText::view,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use iced::{
|
|||
};
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::application("Visible Bounds - Iced", Example::update, Example::view)
|
||||
iced::application(Example::default, Example::update, Example::view)
|
||||
.subscription(Example::subscription)
|
||||
.theme(|_| Theme::Dark)
|
||||
.run()
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ use iced::{Center, Element, Fill, Subscription, Task, color};
|
|||
use std::sync::LazyLock;
|
||||
|
||||
pub fn main() -> iced::Result {
|
||||
iced::application("WebSocket - Iced", WebSocket::update, WebSocket::view)
|
||||
iced::application(WebSocket::new, WebSocket::update, WebSocket::view)
|
||||
.subscription(WebSocket::subscription)
|
||||
.run_with(WebSocket::new)
|
||||
.run()
|
||||
}
|
||||
|
||||
struct WebSocket {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue