Skip to main content

ReceiverOwner

Struct ReceiverOwner 

Source
#[doc(hidden)]
pub struct ReceiverOwner { sexp: SEXP, _root: Option<PoolRoot>, }
Expand description

A generated method’s receiver: the EXTPTRSXP resolve_receiver finds in the .Call argument, rooted for the call when a class handle carried it. R code the method calls back into can drop the handle’s reference, and the finalizer would then free the value under the method’s borrow. A bare pointer is the .Call argument itself, which R keeps alive.

Fields§

§sexp: SEXP§_root: Option<PoolRoot>

Implementations§

Source§

impl ReceiverOwner

Source

pub fn resolve<T: TypedExternal>(sexp: SEXP) -> Self

Resolve sexp like resolve_receiver. Runs on R’s main thread (the generated prelude).

Source

pub fn get(&self) -> SEXP

The resolved EXTPTRSXP.

Source

pub fn owner(&self) -> &SEXP

The resolved EXTPTRSXP, as the owner of an ExternalPtrRef / ExternalPtrMut receiver.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 32 bytes