extendr_ffi/
altrep.rs

1//! ALTREP support
2//!
3//! The core functions to support ALTREP in R.
4use super::*;
5
6#[allow(non_camel_case_types)]
7/// Must return an R value of SEXPTYPE type containing the result of conversion of x into that type, ignoring the attributes.
8/// May return a null pointer, making R perform the conversion as usual (see coerceVector). The default method returns a null pointer.
9pub type R_altrep_Coerce_method_t =
10    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP, arg2: SEXPTYPE) -> SEXP>;
11
12#[repr(C)]
13#[derive(Debug, Copy, Clone)]
14pub struct R_altrep_class_t {
15    pub ptr: SEXP,
16}
17
18/// Like the Unserialize method above, but must also take care of setting the attributes, the levels field and the object bit on the return value. This is likely impossible to implement within the confines of the R API.
19/// The default method calls the Unserialize method, sets the attributes, the object bit, and the levels field, and returns the result.
20pub type R_altrep_UnserializeEX_method_t = ::std::option::Option<
21    unsafe extern "C" fn(
22        arg1: SEXP,
23        arg2: SEXP,
24        arg3: SEXP,
25        arg4: ::std::os::raw::c_int,
26        arg5: ::std::os::raw::c_int,
27    ) -> SEXP,
28>;
29
30/// Must construct and return an ALTREP object of the given class given the data previously prepared by the Serialized_state method above.
31/// The default method signals an R-level error.
32pub type R_altrep_Unserialize_method_t =
33    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP, arg2: SEXP) -> SEXP>;
34
35/// Must prepare and return a representation of x that can be given to the Unserialize methods below in order to recreate it.
36///
37/// May return a null pointer, making R materialise the object when saving it. The default method returns a null pointer.
38pub type R_altrep_Serialized_state_method_t =
39    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP) -> SEXP>;
40
41///  Like the Duplicate method above, but must duplicate the attributes in the same manner.
42///  May return a null pointer, in which case R will produce a materialised copy of the object by itself. The default method calls the Duplicate method, duplicates the attributes of x and installs them onto the return value.
43pub type R_altrep_DuplicateEX_method_t =
44    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP, arg2: Rboolean) -> SEXP>;
45
46/// Must return a copy (see duplicate) of x that can be altered independently of x, ignoring the attributes. R will duplicate and install the attributes by itself.
47///
48/// May return a null pointer, in which case R will produce a materialised copy of the object by itself. The default method returns a null pointer.
49pub type R_altrep_Duplicate_method_t =
50    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP, arg2: Rboolean) -> SEXP>;
51
52/// This method will be called from .Internal(inspect(...)) after printing the standard SEXP header contents; it can then print (see Rprintf) additional information specific to this ALTREP class. When starting a new line, this method must respect the output indentation pre. Printing the vector elements, if done, should be subject to the recommended vector printing length pvec. The method should call inspect_subtree for child elements, subject to the limits in deep.
53/// If the return value is TRUE, R will consider the value inspected and won’t access its contents; otherwise R will then inspect the contents of x as if it was an ordinary value. Either way, R will then take care of inspecting the attributes of x.
54/// The default method returns FALSE.
55/// Versions: Appeared in 3.5.0.
56pub type R_altrep_Inspect_method_t = ::std::option::Option<
57    unsafe extern "C" fn(
58        arg1: SEXP,
59        arg2: ::std::os::raw::c_int,
60        arg3: ::std::os::raw::c_int,
61        arg4: ::std::os::raw::c_int,
62        arg5: ::std::option::Option<
63            unsafe extern "C" fn(
64                arg1: SEXP,
65                arg2: ::std::os::raw::c_int,
66                arg3: ::std::os::raw::c_int,
67                arg4: ::std::os::raw::c_int,
68            ),
69        >,
70    ) -> Rboolean,
71>;
72
73/// Must return the length of the compact-representation vector, or signal an error. The default method signals an error.
74pub type R_altrep_Length_method_t =
75    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP) -> R_xlen_t>;
76
77/// Must return a pointer to the start of the buffer of type corresponding to the SEXPTYPE of x and containing XLENGTH(x) elements (see DATAPTR_RO) corresponding to the contents of x. May signal an R error instead.
78///  The default method always signals an error.
79pub type R_altvec_Dataptr_method_t = ::std::option::Option<
80    unsafe extern "C" fn(arg1: SEXP, arg2: Rboolean) -> *mut ::std::os::raw::c_void,
81>;
82
83/// Like the Dataptr method above, but the method may return a null pointer to indicate a preference for *_Elt (see REAL_ELT) and *_Get_region (see REAL_GET_REGION) methods instead of full buffer access. The return value will not be used to modify x.
84/// The default method always returns a null pointer.
85pub type R_altvec_Dataptr_or_null_method_t =
86    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP) -> *const ::std::os::raw::c_void>;
87/// Must allocate and return a new vector containing the result of subsetting, `x[indx]`, following the usual semantics of the [ operator for numeric subscripts. For values outside the range of x, missing values must be returned (R_NilValue for VECSXP lists, 0 for RAWSXP vectors). May also return a null pointer (see above).
88///
89/// The default method always returns a null pointer.
90/// Versions: Appeared in 3.5.0.
91pub type R_altvec_Extract_subset_method_t =
92    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP, arg2: SEXP, arg3: SEXP) -> SEXP>;
93/// Must return `x[i]` for the 0-based index i. The default method returns `INTEGER(x)[i]`.
94pub type R_altinteger_Elt_method_t = ::std::option::Option<
95    unsafe extern "C" fn(arg1: SEXP, arg2: R_xlen_t) -> ::std::os::raw::c_int,
96>;
97/// Must copy up to n elements, starting at 0-based index i, into `buf[n]`, and return the number of elements copied. The default method defers to INTEGER_ELT and hence the Elt method above.
98pub type R_altinteger_Get_region_method_t = ::std::option::Option<
99    unsafe extern "C" fn(
100        arg1: SEXP,
101        arg2: R_xlen_t,
102        arg3: R_xlen_t,
103        arg4: *mut ::std::os::raw::c_int,
104    ) -> R_xlen_t,
105>;
106/// Must return one of the sortedness constants: SORTED_DECR, UNKNOWN_SORTEDNESS, SORTED_INCR. See INTEGER_IS_SORTED. The default method always returns UNKNOWN_SORTEDNESS.
107pub type R_altinteger_Is_sorted_method_t =
108    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP) -> ::std::os::raw::c_int>;
109/// Must return 1 if x is known not to store any missing values (see INTEGER_NO_NA), otherwise 0 (including if it’s unknown). The default method always returns 0.
110pub type R_altinteger_No_NA_method_t =
111    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP) -> ::std::os::raw::c_int>;
112/// Must calculate and return the specified summary of the contents of x, ignoring missing values if narm is TRUE. May return a null pointer, in which case R will compute the summary by accessing the elements of the vector.
113pub type R_altinteger_Sum_method_t =
114    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP, arg2: Rboolean) -> SEXP>;
115/// Must calculate and return the specified summary of the contents of x, ignoring missing values if narm is TRUE. May return a null pointer, in which case R will compute the summary by accessing the elements of the vector.
116pub type R_altinteger_Min_method_t =
117    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP, arg2: Rboolean) -> SEXP>;
118/// Must calculate and return the specified summary of the contents of x, ignoring missing values if narm is TRUE. May return a null pointer, in which case R will compute the summary by accessing the elements of the vector.
119pub type R_altinteger_Max_method_t =
120    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP, arg2: Rboolean) -> SEXP>;
121/// Must return `x[i]` for the 0-based index i. The default method returns `REAL(x)[i]`.
122pub type R_altreal_Elt_method_t =
123    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP, arg2: R_xlen_t) -> f64>;
124/// Must copy up to n elements, starting at 0-based index i, into `buf[n]`, and return the number of elements copied. The default method defers to REAL_ELT and hence the Elt method above.
125pub type R_altreal_Get_region_method_t = ::std::option::Option<
126    unsafe extern "C" fn(arg1: SEXP, arg2: R_xlen_t, arg3: R_xlen_t, arg4: *mut f64) -> R_xlen_t,
127>;
128///Must return one of the sortedness constants: SORTED_DECR, UNKNOWN_SORTEDNESS, SORTED_INCR. See REAL_IS_SORTED. The default method always returns UNKNOWN_SORTEDNESS.
129pub type R_altreal_Is_sorted_method_t =
130    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP) -> ::std::os::raw::c_int>;
131/// Must return 1 if x is known not to store any missing values (see REAL_NO_NA), otherwise 0 (including if it’s unknown). The default method always returns 0.
132pub type R_altreal_No_NA_method_t =
133    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP) -> ::std::os::raw::c_int>;
134/// Must calculate and return the specified summary of the contents of x, ignoring missing values if narm is TRUE. May return a null pointer, in which case R will compute the summary by accessing the elements of the vector.
135pub type R_altreal_Sum_method_t =
136    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP, arg2: Rboolean) -> SEXP>;
137/// Must calculate and return the specified summary of the contents of x, ignoring missing values if narm is TRUE. May return a null pointer, in which case R will compute the summary by accessing the elements of the vector.
138pub type R_altreal_Min_method_t =
139    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP, arg2: Rboolean) -> SEXP>;
140/// Must calculate and return the specified summary of the contents of x, ignoring missing values if narm is TRUE. May return a null pointer, in which case R will compute the summary by accessing the elements of the vector.
141pub type R_altreal_Max_method_t =
142    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP, arg2: Rboolean) -> SEXP>;
143/// Must return `x[i]` for the 0-based index i. The default method returns `LOGICAL(x)[i]`.
144pub type R_altlogical_Elt_method_t = ::std::option::Option<
145    unsafe extern "C" fn(arg1: SEXP, arg2: R_xlen_t) -> ::std::os::raw::c_int,
146>;
147/// Must copy up to n elements, starting at 0-based index i, into `buf[n]`, and return the number of elements copied. The default method defers to LOGICAL_ELT and hence the Elt method above.
148pub type R_altlogical_Get_region_method_t = ::std::option::Option<
149    unsafe extern "C" fn(
150        arg1: SEXP,
151        arg2: R_xlen_t,
152        arg3: R_xlen_t,
153        arg4: *mut ::std::os::raw::c_int,
154    ) -> R_xlen_t,
155>;
156/// Must return one of the sortedness constants: SORTED_DECR, UNKNOWN_SORTEDNESS, SORTED_INCR. See INTEGER_IS_SORTED. The default method always returns UNKNOWN_SORTEDNESS
157pub type R_altlogical_Is_sorted_method_t =
158    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP) -> ::std::os::raw::c_int>;
159/// Must return 1 if x is known not to store any missing values (see LOGICAL_NO_NA), otherwise 0 (including if it’s unknown). The default method always returns 0.
160pub type R_altlogical_No_NA_method_t =
161    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP) -> ::std::os::raw::c_int>;
162/// Must calculate and return the specified summary of the contents of x, ignoring missing values if narm is TRUE. May return a null pointer, in which case R will compute the summary by accessing the elements of the vector.
163/// Versions: Appeared in 3.6.0.
164pub type R_altlogical_Sum_method_t =
165    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP, arg2: Rboolean) -> SEXP>;
166/// Must return `x[i]` for the 0-based index i. The default method returns `RAW(x)[i]`.
167pub type R_altraw_Elt_method_t =
168    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP, arg2: R_xlen_t) -> Rbyte>;
169/// Must copy up to n elements, starting at 0-based index i, into `buf[n]`, and return the number of elements copied. The default method defers to `RAW_ELT` and hence the Elt method above.
170/// Versions: Appeared in 3.6.0.
171pub type R_altraw_Get_region_method_t = ::std::option::Option<
172    unsafe extern "C" fn(arg1: SEXP, arg2: R_xlen_t, arg3: R_xlen_t, arg4: *mut Rbyte) -> R_xlen_t,
173>;
174/// Must return `x[i]` for the 0-based index i. The default method returns `COMPLEX(x)[i]`.
175pub type R_altcomplex_Elt_method_t =
176    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP, arg2: R_xlen_t) -> Rcomplex>;
177/// Must copy up to n elements, starting at 0-based index i, into `buf[n]`, and return the number of elements copied. The default method defers to COMPLEX_ELT and hence the Elt method above.
178/// Versions: Appeared in 3.6.0.
179pub type R_altcomplex_Get_region_method_t = ::std::option::Option<
180    unsafe extern "C" fn(
181        arg1: SEXP,
182        arg2: R_xlen_t,
183        arg3: R_xlen_t,
184        arg4: *mut Rcomplex,
185    ) -> R_xlen_t,
186>;
187/// Must return `x[i]` (for 0-based i) or signal an error. The default method always raises an error.
188pub type R_altstring_Elt_method_t =
189    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP, arg2: R_xlen_t) -> SEXP>;
190/// Must set `x[i] <- v` (for 0-based i), even if it’s not compatible with the chosen compact representation, or signal an error. The default method always raises an error.
191pub type R_altstring_Set_elt_method_t =
192    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP, arg2: R_xlen_t, arg3: SEXP)>;
193/// Must return one of the sortedness constants: SORTED_DECR, UNKNOWN_SORTEDNESS, SORTED_INCR. See STRING_IS_SORTED. The default method always returns UNKNOWN_SORTEDNESS.
194pub type R_altstring_Is_sorted_method_t =
195    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP) -> ::std::os::raw::c_int>;
196/// Must return 1 if x is known not to store any missing values (see STRING_NO_NA), otherwise 0 (including if it’s unknown). The default method always returns 0.
197pub type R_altstring_No_NA_method_t =
198    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP) -> ::std::os::raw::c_int>;
199/// Must return `x[[i]]` for the 0-based index i or raise an error.
200pub type R_altlist_Elt_method_t =
201    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP, arg2: R_xlen_t) -> SEXP>;
202/// Must set `x[[i]] <- v` for the 0-based index i, altering x, or raise an error.
203pub type R_altlist_Set_elt_method_t =
204    ::std::option::Option<unsafe extern "C" fn(arg1: SEXP, arg2: R_xlen_t, arg3: SEXP)>;
205
206extern "C" {
207    /// Returns a nonzero value if x is a “compact representation” (ALTREP) value. Access to the data pointers of ALTREP values may be problematic and should be replaced with access to individual elements (see REAL_ELT) or vector subregions (see REAL_GET_REGION). See also: <https://svn.r-project.org/R/branches/ALTREP/ALTREP.html>
208    pub fn ALTREP(x: SEXP) -> ::std::os::raw::c_int;
209    /// Returns the ALTREP class object containing the methods set up for use on ax. The return value is of unspecified SEXPTYPE. Behaviour is undefined if ax is not an ALTREP object.
210    pub fn ALTREP_CLASS(x: SEXP) -> SEXP;
211    /// Returns one of the two ALTREP instance variables belonging to ax. Behaviour is undefined if ax is not an ALTREP object.
212    pub fn R_altrep_data1(x: SEXP) -> SEXP;
213    /// Returns one of the two ALTREP instance variables belonging to ax. Behaviour is undefined if ax is not an ALTREP object.
214    pub fn R_altrep_data2(x: SEXP) -> SEXP;
215    /// Allocates, constructs and returns a compact-representation value. It will have the TYPEOF() of the corresponding class and will use the methods in aclass and the instance variables to respond to calls such as XLENGTH().
216    pub fn R_new_altrep(aclass: R_altrep_class_t, data1: SEXP, data2: SEXP) -> SEXP;
217    /// Allocates, registers and returns an ALTREP class with the given names.
218    /// In addition to the methods given here, compact representation string vectors must implement the common “altrep” methods (see R_set_altrep_..._method) and the common “altvec” methods (see R_set_altvec_..._method).
219    pub fn R_make_altstring_class(
220        cname: *const ::std::os::raw::c_char,
221        pname: *const ::std::os::raw::c_char,
222        info: *mut DllInfo,
223    ) -> R_altrep_class_t;
224    /// Allocates, registers and returns an ALTREP class with the given names.
225
226    /// In addition to the methods given here, compact representation integer vectors must implement the common “altrep” methods (see R_set_altrep_..._method) and the common “altvec” methods (see R_set_altvec_..._method).
227    pub fn R_make_altinteger_class(
228        cname: *const ::std::os::raw::c_char,
229        pname: *const ::std::os::raw::c_char,
230        info: *mut DllInfo,
231    ) -> R_altrep_class_t;
232    /// Allocates, registers and returns an ALTREP class with the given names.
233
234    /// In addition to the methods given here, compact representation integer vectors must implement the common “altrep” methods (see R_set_altrep_..._method) and the common “altvec” methods (see R_set_altvec_..._method).
235    pub fn R_make_altreal_class(
236        cname: *const ::std::os::raw::c_char,
237        pname: *const ::std::os::raw::c_char,
238        info: *mut DllInfo,
239    ) -> R_altrep_class_t;
240    /// Allocates, registers and returns an ALTREP class with the given names.
241
242    /// In addition to the methods given here, compact representation integer vectors must implement the common “altrep” methods (see R_set_altrep_..._method) and the common “altvec” methods (see R_set_altvec_..._method).
243    pub fn R_make_altlogical_class(
244        cname: *const ::std::os::raw::c_char,
245        pname: *const ::std::os::raw::c_char,
246        info: *mut DllInfo,
247    ) -> R_altrep_class_t;
248    /// Allocates, registers and returns an ALTREP class with the given names.
249
250    /// In addition to the methods given here, compact representation integer vectors must implement the common “altrep” methods (see R_set_altrep_..._method) and the common “altvec” methods (see R_set_altvec_..._method).
251    pub fn R_make_altraw_class(
252        cname: *const ::std::os::raw::c_char,
253        pname: *const ::std::os::raw::c_char,
254        info: *mut DllInfo,
255    ) -> R_altrep_class_t;
256    /// Allocates, registers and returns an ALTREP class with the given names.
257
258    /// In addition to the methods given here, compact representation integer vectors must implement the common “altrep” methods (see R_set_altrep_..._method) and the common “altvec” methods (see R_set_altvec_..._method).
259    pub fn R_make_altcomplex_class(
260        cname: *const ::std::os::raw::c_char,
261        pname: *const ::std::os::raw::c_char,
262        info: *mut DllInfo,
263    ) -> R_altrep_class_t;
264    /// Allocates, registers and returns an ALTREP class with the given names.
265
266    /// In addition to the methods given here, compact representation integer vectors must implement the common “altrep” methods (see R_set_altrep_..._method) and the common “altvec” methods (see R_set_altvec_..._method).
267    pub fn R_make_altlist_class(
268        cname: *const ::std::os::raw::c_char,
269        pname: *const ::std::os::raw::c_char,
270        info: *mut DllInfo,
271    ) -> R_altrep_class_t;
272    /// Returns a nonzero value if x is an ALTREP value whose class pointer is class.
273    pub fn R_altrep_inherits(x: SEXP, arg1: R_altrep_class_t) -> Rboolean;
274    /// Sets the function pointer inside the ALTREP class object. Currently, these methods are common to all ALTREP classes. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
275    pub fn R_set_altrep_UnserializeEX_method(
276        cls: R_altrep_class_t,
277        fun: R_altrep_UnserializeEX_method_t,
278    );
279    /// Sets the function pointer inside the ALTREP class object. Currently, these methods are common to all ALTREP classes. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
280    pub fn R_set_altrep_Unserialize_method(
281        cls: R_altrep_class_t,
282        fun: R_altrep_Unserialize_method_t,
283    );
284    /// Sets the function pointer inside the ALTREP class object. Currently, these methods are common to all ALTREP classes. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
285    pub fn R_set_altrep_Serialized_state_method(
286        cls: R_altrep_class_t,
287        fun: R_altrep_Serialized_state_method_t,
288    );
289    /// Sets the corresponding ALTREP instance variable of ax to v, sharing it without duplication. Behaviour is undefined if ax is not an ALTREP object.
290    /// Versions: Appeared in 3.5.0.
291    pub fn R_set_altrep_data1(x: SEXP, v: SEXP);
292    /// Sets the corresponding ALTREP instance variable of ax to v, sharing it without duplication. Behaviour is undefined if ax is not an ALTREP object.
293    /// Versions: Appeared in 3.5.0.
294    pub fn R_set_altrep_data2(x: SEXP, v: SEXP);
295    ///Sets the function pointer inside the ALTREP class object. Currently, these methods are common to all ALTREP classes. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
296    pub fn R_set_altrep_DuplicateEX_method(
297        cls: R_altrep_class_t,
298        fun: R_altrep_DuplicateEX_method_t,
299    );
300    /// Sets the function pointer inside the ALTREP class object. Currently, these methods are common to all ALTREP classes. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
301    pub fn R_set_altrep_Duplicate_method(cls: R_altrep_class_t, fun: R_altrep_Duplicate_method_t);
302    /// Sets the function pointer inside the ALTREP class object. Currently, these methods are common to all ALTREP classes. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
303    pub fn R_set_altrep_Coerce_method(cls: R_altrep_class_t, fun: R_altrep_Coerce_method_t);
304    /// Sets the function pointer inside the ALTREP class object. Currently, these methods are common to all ALTREP classes. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
305    pub fn R_set_altrep_Inspect_method(cls: R_altrep_class_t, fun: R_altrep_Inspect_method_t);
306    /// Sets the function pointer inside the ALTREP class object. Currently, these methods are common to all ALTREP classes. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
307    pub fn R_set_altrep_Length_method(cls: R_altrep_class_t, fun: R_altrep_Length_method_t);
308    /// Sets the function pointer inside the ALTREP class object. Currently, all ALTREP classes are vector classes. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
309    pub fn R_set_altvec_Dataptr_method(cls: R_altrep_class_t, fun: R_altvec_Dataptr_method_t);
310    /// Sets the function pointer inside the ALTREP class object. Currently, all ALTREP classes are vector classes. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
311    pub fn R_set_altvec_Dataptr_or_null_method(
312        cls: R_altrep_class_t,
313        fun: R_altvec_Dataptr_or_null_method_t,
314    );
315    /// Sets the function pointer inside the ALTREP class object. Currently, all ALTREP classes are vector classes. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
316    pub fn R_set_altvec_Extract_subset_method(
317        cls: R_altrep_class_t,
318        fun: R_altvec_Extract_subset_method_t,
319    );
320    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact integer vector class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
321    pub fn R_set_altinteger_Elt_method(cls: R_altrep_class_t, fun: R_altinteger_Elt_method_t);
322    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact integer vector class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
323    pub fn R_set_altinteger_Get_region_method(
324        cls: R_altrep_class_t,
325        fun: R_altinteger_Get_region_method_t,
326    );
327    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact integer vector class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
328    pub fn R_set_altinteger_Is_sorted_method(
329        cls: R_altrep_class_t,
330        fun: R_altinteger_Is_sorted_method_t,
331    );
332    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact integer vector class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
333    pub fn R_set_altinteger_No_NA_method(cls: R_altrep_class_t, fun: R_altinteger_No_NA_method_t);
334    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact integer vector class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
335    pub fn R_set_altinteger_Sum_method(cls: R_altrep_class_t, fun: R_altinteger_Sum_method_t);
336    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact integer vector class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
337    pub fn R_set_altinteger_Min_method(cls: R_altrep_class_t, fun: R_altinteger_Min_method_t);
338    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact integer vector class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
339    pub fn R_set_altinteger_Max_method(cls: R_altrep_class_t, fun: R_altinteger_Max_method_t);
340    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact real vector class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
341    pub fn R_set_altreal_Elt_method(cls: R_altrep_class_t, fun: R_altreal_Elt_method_t);
342    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact real vector class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
343    pub fn R_set_altreal_Get_region_method(
344        cls: R_altrep_class_t,
345        fun: R_altreal_Get_region_method_t,
346    );
347    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact real vector class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
348    pub fn R_set_altreal_Is_sorted_method(cls: R_altrep_class_t, fun: R_altreal_Is_sorted_method_t);
349    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact real vector class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
350    pub fn R_set_altreal_No_NA_method(cls: R_altrep_class_t, fun: R_altreal_No_NA_method_t);
351    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact real vector class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
352    pub fn R_set_altreal_Sum_method(cls: R_altrep_class_t, fun: R_altreal_Sum_method_t);
353    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact real vector class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
354    pub fn R_set_altreal_Min_method(cls: R_altrep_class_t, fun: R_altreal_Min_method_t);
355    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact real vector class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
356    pub fn R_set_altreal_Max_method(cls: R_altrep_class_t, fun: R_altreal_Max_method_t);
357    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact integer vector class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
358    pub fn R_set_altlogical_Elt_method(cls: R_altrep_class_t, fun: R_altlogical_Elt_method_t);
359    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact integer vector class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
360    pub fn R_set_altlogical_Get_region_method(
361        cls: R_altrep_class_t,
362        fun: R_altlogical_Get_region_method_t,
363    );
364    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact integer vector class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
365    pub fn R_set_altlogical_Is_sorted_method(
366        cls: R_altrep_class_t,
367        fun: R_altlogical_Is_sorted_method_t,
368    );
369    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact integer vector class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
370    pub fn R_set_altlogical_No_NA_method(cls: R_altrep_class_t, fun: R_altlogical_No_NA_method_t);
371    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact integer vector class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
372    pub fn R_set_altlogical_Sum_method(cls: R_altrep_class_t, fun: R_altlogical_Sum_method_t);
373    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact complex vector class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
374    pub fn R_set_altraw_Elt_method(cls: R_altrep_class_t, fun: R_altraw_Elt_method_t);
375    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact complex vector class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
376    pub fn R_set_altraw_Get_region_method(cls: R_altrep_class_t, fun: R_altraw_Get_region_method_t);
377    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact complex vector class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
378    pub fn R_set_altcomplex_Elt_method(cls: R_altrep_class_t, fun: R_altcomplex_Elt_method_t);
379    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact complex vector class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
380    pub fn R_set_altcomplex_Get_region_method(
381        cls: R_altrep_class_t,
382        fun: R_altcomplex_Get_region_method_t,
383    );
384    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact string representation class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
385    pub fn R_set_altstring_Elt_method(cls: R_altrep_class_t, fun: R_altstring_Elt_method_t);
386    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact string representation class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
387    pub fn R_set_altstring_Set_elt_method(cls: R_altrep_class_t, fun: R_altstring_Set_elt_method_t);
388    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact string representation class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
389    pub fn R_set_altstring_Is_sorted_method(
390        cls: R_altrep_class_t,
391        fun: R_altstring_Is_sorted_method_t,
392    );
393    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact string representation class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
394    pub fn R_set_altstring_No_NA_method(cls: R_altrep_class_t, fun: R_altstring_No_NA_method_t);
395    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact complex vector class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
396    pub fn R_set_altlist_Elt_method(cls: R_altrep_class_t, fun: R_altlist_Elt_method_t);
397    /// Sets the function pointer inside the ALTREP class object. Behaviour is undefined if cls is not a compact complex vector class. There is no facility for unregistering ALTREP classes, so once a function pointer is set from a package shared library, it must not be unloaded.
398    pub fn R_set_altlist_Set_elt_method(cls: R_altrep_class_t, fun: R_altlist_Set_elt_method_t);
399}