class Thrift::CompactProtocol::CompactTypes
All of the on-wire type codes.
Constants
- BINARY
- BOOLEAN_FALSE
- BOOLEAN_TRUE
- BYTE
- COMPACT_TO_TTYPE
- DOUBLE
- I16
- I32
- I64
- LIST
- MAP
- SET
- STRUCT
- TTYPE_TO_COMPACT
Public Class Methods
get_compact_type(ttype)
click to toggle source
# File lib/thrift/protocol/compact_protocol.rb 90 def self.get_compact_type(ttype) 91 val = TTYPE_TO_COMPACT[ttype] 92 raise "don't know what type: #{ttype & 0x0f}" unless val 93 val 94 end
get_ttype(compact_type)
click to toggle source
# File lib/thrift/protocol/compact_protocol.rb 84 def self.get_ttype(compact_type) 85 val = COMPACT_TO_TTYPE[compact_type & 0x0f] 86 raise "don't know what type: #{compact_type & 0x0f}" unless val 87 val 88 end
is_bool_type?(b)
click to toggle source
# File lib/thrift/protocol/compact_protocol.rb 49 def self.is_bool_type?(b) 50 (b & 0x0f) == BOOLEAN_TRUE || (b & 0x0f) == BOOLEAN_FALSE 51 end