Skip to content

Using external struct as command parameters and result #49

@MarcWadai

Description

@MarcWadai

When using a struct that was not defined on my tauri app but on an external crates as a parameter for my procedure. I got this error !

the trait bound Toto: Type is not satisfied

I guess it is because the external crate doesn't implement specta Type trait.

How can i make the external struct implement the trait Type ?
I saw some solutions where we can redefine a struct and use it as a type for an attribute in our wrapper specta-rs/specta#284.
But in my case I don't want to define an attribute, but use directly the struct as is. Like below. Is it possible ?

use another_crate::Profile

#[taurpc::ipc_type]
struct MyProfile(Profile);

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