Module Mongo::Protocol::Serializers::Byte
In: lib/mongo/protocol/serializers.rb

MongoDB wire protocol serialization strategy for a single byte.

Writes and fetches a single byte from the byte buffer.

Methods

Public Class methods

Deserializes a byte from the byte buffer.

@param [ BSON::ByteBuffer ] buffer Buffer containing the value to read.

@return [ String ] The byte.

@since 2.5.0

Writes a byte into the buffer.

@param [ BSON::ByteBuffer ] buffer Buffer to receive the single byte. @param [ String ] value The byte to write to the buffer. @param [ true, false ] validating_keys Whether to validate keys.

@return [ BSON::ByteBuffer ] Buffer with serialized value.

@since 2.5.0

[Validate]