Module: Mongo::Protocol::Serializers::Byte Private
Relationships & Source Files | |
Defined in: | lib/mongo/protocol/serializers.rb |
Overview
MongoDB wire protocol serialization strategy for a single byte.
Writes and fetches a single byte from the byte buffer.
Class Method Summary
-
.deserialize(buffer, options = {}) ⇒ String
Internal use only
Deserializes a byte from the byte buffer.
-
.serialize(buffer, value, validating_keys = nil) ⇒ BSON::ByteBuffer
Internal use only
Writes a byte into the buffer.
Class Method Details
.deserialize(buffer, options = {}) ⇒ String
Deserializes a byte from the byte buffer.
# File 'lib/mongo/protocol/serializers.rb', line 426
def self.deserialize(buffer, = {}) buffer.get_byte end
.serialize(buffer, value, validating_keys = nil) ⇒ BSON::ByteBuffer
Writes a byte into the buffer.
# File 'lib/mongo/protocol/serializers.rb', line 414
def self.serialize(buffer, value, validating_keys = nil) buffer.put_byte(value) end