Skip to content

Handle std::result::Result within macro #1

Description

@shimunn

Hi,

the Tauri doc states:

if the command returns an error, the promise will reject, otherwise, it resolves:

Which means the promise https://github.com/ChangeCaps/tauri-invoke/blob/main/src/lib.rs#L65 will resolve to an u32 for the command

async fn example_invoke_result() -> Result<u32, ()>,

Therefore the macro generated function should be:

async fn example_invoke_result() -> InvokeResult<u32>,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions