rb_struct_define

Function rb_struct_define 

Source
pub unsafe extern "C" fn rb_struct_define(
    name: *const c_char,
    ...
) -> VALUE
Expand description

Defines a struct class.

@param[in] name Name of the class. @param[in] … Arbitrary number of const char*, terminated by zero. Each of which are the name of fields. @exception rb_eNameError name is not a constant name. @exception rb_eTypeError name is already taken. @exception rb_eArgError Duplicated field name. @return The defined class. @post Global toplevel constant name is defined. @note name is allowed to be a null pointer. This function creates an anonymous struct class then.

@internal

§Not seriously checked but it seems this function does not share its implementation with how Struct.new is implemented…?

Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3