Method: Thrift::Union#read
- Defined in:
- lib/thrift/union.rb
#read(iprot) ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/thrift/union.rb', line 56 def read(iprot) iprot.read_struct_begin fname, ftype, fid = iprot.read_field_begin (iprot, fid, ftype) iprot.read_field_end fname, ftype, fid = iprot.read_field_begin raise "Too many fields for union" unless (ftype == Types::STOP) iprot.read_struct_end validate end |