module Moped::Protocol::Message::ClassMethods

Provides a DSL for defining struct-like fields for building messages for the Mongo Wire.

@example

class Command
  extend Message::ClassMethods

  int32 :length
end

Command.fields # => [:length]
command = Command.new
command.length = 12
command.serialize_length("") # => "\f\x00\x00\x00"