class FFI::StructLayout
Public Instance Methods
@return [Integer] Get the offset of a field.
# File lib/ffi/struct_layout.rb, line 46 def offset_of(field_name) self[field_name].offset end
@return [Array<Array(Symbol, Integer)> Get an array of tuples (field name, offset of the field).
# File lib/ffi/struct_layout.rb, line 40 def offsets members.map { |m| [ m, self[m].offset ] } end