Class: Protobug::Field::Int64Field

Inherits:
IntegerField show all
Defined in:
lib/protobug/field.rb

Overview

encoding: fixed, varint, zigzag bitlength: 32, 64 signed: true, false EXCEPT: no unsigned zigzag

Constant Summary

Constants inherited from Protobug::Field

PACKABLE_WIRE_TYPES

Instance Attribute Summary

Attributes inherited from Protobug::Field

#adder, #cardinality, #clearer, #haser, #ivar, #json_name, #name, #number, #oneof, #setter

Instance Method Summary collapse

Methods inherited from IntegerField

#binary_decode_one, #binary_encode_one, #default, #json_decode_one, #json_encode_one, #validate!

Methods inherited from Protobug::Field

#adder_method_definition, #binary_decode, #binary_encode, #initialize, #json_decode, #json_encode, #json_key_encode, #method_definitions, #optional?, #packed?, #pretty_print, #proto3_optional?, #repeated?, #to_text, #validate!

Constructor Details

This class inherits a constructor from Protobug::Field

Instance Method Details

#bit_lengthObject



555
556
557
# File 'lib/protobug/field.rb', line 555

def bit_length
  64
end

#encodingObject



551
552
553
# File 'lib/protobug/field.rb', line 551

def encoding
  :varint
end

#signedObject



559
560
561
# File 'lib/protobug/field.rb', line 559

def signed
  true
end

#wire_typeObject



563
564
565
# File 'lib/protobug/field.rb', line 563

def wire_type
  0
end