#[doc(hidden)]pub trait SidecarField {
// Required methods
fn __mx_flush(&self, prot: SEXP, index: usize);
fn __mx_load(&self, prot: SEXP, index: usize);
fn __mx_discard_pending(&self);
fn __mx_replaces_saved(&self) -> bool;
}Expand description
A Sidecar<T> field, as the handle sees it through the
TypedExternal::__mx_visit_sidecars hook the derive emits. Every method
runs on R’s main thread.
Required Methods§
Sourcefn __mx_flush(&self, prot: SEXP, index: usize)
fn __mx_flush(&self, prot: SEXP, index: usize)
Moves a pending value into slot index of prot.
Sourcefn __mx_load(&self, prot: SEXP, index: usize)
fn __mx_load(&self, prot: SEXP, index: usize)
Reads slot index of prot back into the field as its pending value,
unless one is pending already.
Sourcefn __mx_discard_pending(&self)
fn __mx_discard_pending(&self)
Drops a pending value, which a write to the slot supersedes.
Sourcefn __mx_replaces_saved(&self) -> bool
fn __mx_replaces_saved(&self) -> bool
Whether the pending value was made by Sidecar::replace.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".