Closed parthdt closed 1 week ago
You can't export an impl
block for a record type at all. impl blocks are only supported for object types (at the moment).
Thanks for the response. Exporting the struct as an object does work.
I'm a beginner in both rust, and swift; would you tell me how to use this field: bytes
, inside swift?
To be precise, Vec<u8>
should be [UInt8]
in swift, but trying to use FzilInput(bytes)
, where bytes
is of type [UInt8]
throws a pointer error.
It's difficult to know without seeing your code, but our test at https://github.com/mozilla/uniffi-rs/tree/main/fixtures/coverall has extensive coverage of "bytes", so that can probably point you in the right direction.
It looks like #2159 is handling this bytes request, so I'll close this for now.
Hello,
I'm trying to export some rust code to swift using uniffi. For the following snippet:
uniffi-bindgen
aborts with error:called Result::unwrap() on an Err value: Constructor return type must be Arc<Self>
.As per Proc-macro docs, Self should be a valid return type.
How can this be solved?