Open tleyden opened 5 months ago
It seems like this might not be possible yet. From the docs:
Currently, the only types that can be created from Rust are number types,
boolean
,SRString
, andSRData
Yea SRArray
can't be created from rust yet, should be possible but haven't implemented it yet
@Brendonovich ok thanks for the clarification. I'll change the ticket title to reflect that
Is it possible to create an
SRArray<SRData>
on the rust side and pass it as a parameter to a swift function? Do you have any examples of doing this?Basically what I'm trying to do is capture a series of screenshots, convert them from
CGImage
->SRData
, and then pass an array of SRData to a swift function. It can't all be on the swift side though, the rust code needs to collect the array ofSRData
and then pass it back to the swift side as an array.Does this sound like the right approach, or would
SRObjectArray<CGImage>
or defining a custom object be easier?