Method: CTypes::Struct::Builder#result

Defined in:
lib/ctypes/struct/builder.rb

#resultObject

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.

get the layout description for internal use in CTypes::Struct



81
82
83
84
85
86
87
# File 'lib/ctypes/struct/builder.rb', line 81

def result
  dry_type = Dry::Types["coercible.hash"]
    .schema(@schema)
    .strict
    .default(@default.freeze)
  [@name, @fields.freeze, dry_type, @size || @bytes, @endian]
end