Pardon my ignorance, trying Julia for the first time. I am trying to write a client for a TCP service I have in C++. I am trying to figure out how to extract the appropriate value from a union type in the response.
I can connect to the TCP server, and submit a FB request. I get the FB response back, which is as defined in the IDL linked above. The response from the server once deserialised prints out the following expected structure:
I am trying to figure out how I can convert the ResultVariantSuccess into the Success structure (or for the case of ResultVariantKeyValueResults into KeyValueResults). In the C++ code, there are value_as methods, which allow me to extract the proper data structures from the unions. I do not see anything similar in the FlatBuffers.jl file (at least did not see anything that looked similar).
Thanks in advance for any help in resolving the issue.
Rakesh
Hello,
Pardon my ignorance, trying Julia for the first time. I am trying to write a client for a TCP service I have in C++. I am trying to figure out how to extract the appropriate value from a union type in the response.
The IDL for the response can be viewed here
The Julia generated structures for the responses look like the following:
I can connect to the TCP server, and submit a FB request. I get the FB response back, which is as defined in the IDL linked above. The response from the server once deserialised prints out the following expected structure:
I am trying to figure out how I can convert the
ResultVariantSuccess
into theSuccess
structure (or for the case ofResultVariantKeyValueResults
intoKeyValueResults
). In the C++ code, there arevalue_as
methods, which allow me to extract the proper data structures from the unions. I do not see anything similar in the FlatBuffers.jl file (at least did not see anything that looked similar).Thanks in advance for any help in resolving the issue. Rakesh