Is there an existing issue for this?
Is this issue related to iced?
What happened?
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, but I want the application to return custom exit code of type u8 based on the operation performed. Ex: 1(success), 2(failure), 3(reboot) etc.
I need help on how to do that.
Current WorkFlow
fn launch_ui_mode() -> iced::Result {
UpdateDriver::run(Settings::default())
}
Main Function:
fn main() -> ExitCode {
let retcode: u8;
let exec_type = get_execution_mode();
if exec_mode == UI{
retcode = launch_ui_mode(); //This is iced::Result type, I need u8 type
}
else{
retcode = launch_cli_mode();
}
return ExitCode::from(retcode);
}
My application runs in both CLI and UI mode, form CLI mode I'm directly returning the u8 type exit code, need to implement that for UI mode too.
What is the expected behavior?
Expectation :
fn launch_ui_mode() -> u8 {
UpdateDriver::run(Settings::default())
}
Version
master
Operative System
Windows
Do you have any log output?
No response
Is there an existing issue for this?
Is this issue related to iced?
What happened?
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 typeiced::Result, but I want the application to return custom exit code of typeu8based on the operation performed. Ex: 1(success), 2(failure), 3(reboot) etc.I need help on how to do that.
Current WorkFlow
Main Function:
My application runs in both CLI and UI mode, form CLI mode I'm directly returning the
u8type exit code, need to implement that for UI mode too.What is the expected behavior?
Expectation :
Version
master
Operative System
Windows
Do you have any log output?
No response