Expand description
ALTREP helpers for ExternalPtr — data1/data2 slot access.
Convenience functions for ALTREP implementations that store their data
in ExternalPtr slots. Also provides the Sidecar marker type for
#[r_data] fields.
Re-exports§
use super::ErasedExternalPtr;🔒use super::ExternalPtr;🔒use super::TypedExternal;🔒use crate::SEXP;🔒
Structs§
- Computed
- Marker type of a read-only R field computed from the Rust value (#1883).
- Computed
Probe 👻 - The autoref probe of a computed getter’s value
V. The generated getter calls(&&&ComputedProbe::of(&value)).__mx_computed_read(value)with the three traits in scope; method lookup tries the receiver&&&ComputedProbe<V>first, so the impl on the deepest reference that fitsVwins:ComputedReadNullforResult<T, ()>, thenComputedReadResultfor anyResult<T, E>, thenComputedReadValuefor anything else. - RSidecar
- Marker type for enabling R sidecar accessors in an
ExternalPtrstruct.
Enums§
- Computed
Read 👻 - What a computed field’s getter gave, as the generated getter reads it.
Sorted by the autoref probe on
ComputedProbe, since the derive sees the getter’s path, not its return type.
Traits§
- Computed
Read 👻Null - First arm:
Result<T, ()>, whoseErr(())readsNULL. - Computed
Read 👻Result - Second arm: any other
Result<T, E>, whoseErris raised. - Computed
Read 👻Value - Last arm: any other value, read as it is.
Functions§
- altrep_
data1_ ⚠as - Extract the ALTREP data1 slot as a typed
ExternalPtr<T>. - altrep_
data1_ ⚠as_ unchecked - Extract the ALTREP data1 slot (unchecked version).
- altrep_
data1_ ⚠mut - Get a mutable reference to data in ALTREP data1 slot via
ErasedExternalPtr. - altrep_
data1_ ⚠mut_ unchecked - Get a mutable reference to data in ALTREP data1 slot (unchecked version).
- altrep_
data2_ ⚠as - Extract the ALTREP data2 slot as a typed
ExternalPtr<T>. - altrep_
data2_ ⚠as_ unchecked - Extract the ALTREP data2 slot (unchecked version).
- data1_
value_ 🔒 ⚠mut - The
Tthaterasedholds, with noRefCellborrow.