Module: Mongo::Protocol::Serializers::Byte Private
- Defined in:
- build/ruby-driver-master/lib/mongo/protocol/serializers.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
MongoDB wire protocol serialization strategy for a single byte.
Writes and fetches a single byte from the byte buffer.
Class Method Summary collapse
-
.deserialize(buffer, options = {}) ⇒ String
private
Deserializes a byte from the byte buffer.
-
.serialize(buffer, value, validating_keys = BSON::Config.validating_keys?) ⇒ BSON::ByteBuffer
private
Writes a byte into the buffer.
Class Method Details
.deserialize(buffer, options = {}) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Deserializes a byte from the byte buffer.
420 421 422 |
# File 'build/ruby-driver-master/lib/mongo/protocol/serializers.rb', line 420 def self.deserialize(buffer, = {}) buffer.get_byte end |
.serialize(buffer, value, validating_keys = BSON::Config.validating_keys?) ⇒ BSON::ByteBuffer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Writes a byte into the buffer.
408 409 410 |
# File 'build/ruby-driver-master/lib/mongo/protocol/serializers.rb', line 408 def self.serialize(buffer, value, validating_keys = BSON::Config.validating_keys?) buffer.put_byte(value) end |