Skip to content

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

@shimunn

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>,

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