Skip to content

How to check return type of script before trying to convert it? #939

@Boscop

Description

@Boscop

In my use case, after evaluating a script, the final value can be one of several types that I want to support.
E.g. I want to support 5 different custom types that the script can produce.
The final value of the script should not be an enum though!
So after evaluating a script, how can I check which gluon type the final value is, before I try to convert it to the equivalent Rust type? :)
Or can I evaluate a script and then try converting the final value to a Rust type, to check if it succeeds?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions