Questions tagged [rust-iced]

4 questions
2
votes
1 answer

How can I send a "Message" back to a "Higher" Struct?

I currently have 2 files: Main.rs and Connection.rs. Connection.rs currently contains the ability to Send, Listen and Connect to a TcpStream. Connection.rs use tokio::io::{AsyncReadExt, AsyncWriteExt, WriteHalf, ReadHalf}; use…
impression7vx
  • 1,728
  • 1
  • 20
  • 50
1
vote
2 answers

Loading fonts at runtime in Rust

I'm working on a Rust desktop application that utilizes the Iced GUI. I use to load a custom font to use for Iced widgets: // fonts module: use iced::Font; pub const NOTO_SANS_REGULAR: Font = Font::External { name: "noto-sans-regular", …
4r7if3x
  • 1,893
  • 1
  • 9
  • 12
0
votes
1 answer

Returning a custom exit code from Iced application

I have a UI application written in iced, which performs various operation. To launch the UI I'm using run() method: UpdateDriver::run(Settings::default()) and currently this returns the exit code of type iced::Result and type of result is pub type…
0
votes
0 answers

Rust Derive Clone For a Specific Struct

Note: I am using iced for the GUI TextInput and tokio for the networking TcpStream I have the following: #[derive(Debug, Clone)] enum Message { Session(Result), //Async Handler SendMessage, …
impression7vx
  • 1,728
  • 1
  • 20
  • 50