Skip to main content

materialized_altrep_data2

Function materialized_altrep_data2 

Source
#[doc(hidden)]
pub unsafe fn materialized_altrep_data2(x: SEXP) -> Option<SEXP>
Expand description

Return the bridge’s R vector cache, if materialization has started.

Bridge-generated classes reserve data2 for a vector of the ALTREP’s type. Once present, its values are the vector’s: read them, not the Rust data. A string cache can be partial: slots not computed yet are C NULL, so read it through the string Elt callback, never directly.

§Safety

x must be a live ALTREP using the bridge’s data2 convention, on R’s thread.