Skip to main content

sidecar_r_struct

Function sidecar_r_struct 

Source
#[doc(hidden)]
pub unsafe fn sidecar_r_struct<'a, T: TypedExternal>(x: SEXP) -> Ref<'a, T>
Expand description

The live T of the external pointer x carries (sidecar_receiver), borrowed shared, for the R getters of a struct field (a field that is not a Sidecar). A pointer without an address is refused: with the classed restored-object errors when T built it (refuse_restored), else as a null pointer (refusal_message).

§Panics

When x carries no live external pointer to a T, or with the miniextendr_borrow_conflict R error while a running call holds the value mutably.

§Safety

Must be called from R’s main thread with a valid x; the borrow must end while x keeps its value.