Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Vec<TransparentEnum> #117

Merged
merged 1 commit into from
Oct 28, 2022
Merged

Support Vec<TransparentEnum> #117

merged 1 commit into from
Oct 28, 2022

Conversation

chinedufn
Copy link
Owner

This commit adds support for bridging Vec<TransparentEnum>.

For example, the following is now possible:

#[swift_bridge::bridge]
mod ffi {
    enum SomeEnum {
        VariantA,
        VariantB,
    }

    extern "Rust" {
        fn some_function(arg: Vec<SomeEnum>) -> Vec<SomeEnum>;
    }
}

This commit adds support for bridging `Vec<TransparentEnum>`.

For example, the following is now possible:

```rust
#[swift_bridge::bridge]
mod ffi {
    enum SomeEnum {
        VariantA,
        VariantB,
    }

    extern "Rust" {
        fn some_function(arg: Vec<SomeEnum>) -> Vec<SomeEnum>;
    }
}
```
@chinedufn chinedufn force-pushed the vec-transparent-enum branch from 2f41fad to cd5b3b8 Compare October 28, 2022 19:31
@chinedufn chinedufn merged commit c1fd717 into master Oct 28, 2022
@chinedufn chinedufn deleted the vec-transparent-enum branch October 28, 2022 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant