Method: Mongo::Protocol::Serializers::Sections::PayloadZero.deserialize
- Defined in:
- lib/mongo/protocol/serializers.rb
.deserialize(buffer, options = {}) ⇒ Array<BSON::Document>
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 section of payload type 0 of an OP_MSG from the IO stream.
287 288 289 290 |
# File 'lib/mongo/protocol/serializers.rb', line 287 def self.deserialize(buffer, = {}) mode = [:deserialize_as_bson] ? :bson : nil BSON::Document.from_bson(buffer, **{ mode: mode }) end |