struct Carrier<T>(PhantomData<T>);Expand description
The carrier ALTREP class of T: a zero-length raw vector whose
Serialized_state encodes the value and whose Unserialize decodes it.
data1 is the owning pointer while the value lives in it, and a holder
(Decoded) from Unserialize until the first access attaches the
value; data2 is then the state that was read, which a save before the
first access writes back unchanged.
Tuple Fields§
§0: PhantomData<T>Trait Implementations§
Source§impl<T: TypedExternal> AltVec for Carrier<T>
impl<T: TypedExternal> AltVec for Carrier<T>
Source§const HAS_DATAPTR: bool = true
const HAS_DATAPTR: bool = true
Set to
true to register dataptr.Source§const HAS_DATAPTR_OR_NULL: bool = true
const HAS_DATAPTR_OR_NULL: bool = true
Set to
true to register dataptr_or_null.Source§fn dataptr_or_null(_x: SEXP) -> *const c_void
fn dataptr_or_null(_x: SEXP) -> *const c_void
Get data pointer without forcing materialization.
Source§const HAS_EXTRACT_SUBSET: bool = false
const HAS_EXTRACT_SUBSET: bool = false
Set to
true to register extract_subset.Source§impl<T: TypedExternal> Altrep for Carrier<T>
impl<T: TypedExternal> Altrep for Carrier<T>
Source§const HAS_SERIALIZED_STATE: bool = true
const HAS_SERIALIZED_STATE: bool = true
Set to
true to register serialized_state.Source§const HAS_UNSERIALIZE: bool = true
const HAS_UNSERIALIZE: bool = true
Set to
true to register unserialize.Source§fn length(_x: SEXP) -> R_xlen_t
fn length(_x: SEXP) -> R_xlen_t
Returns the length of the ALTREP vector.
This is REQUIRED - R cannot determine vector length without it.
Source§fn serialized_state(x: SEXP) -> SEXP
fn serialized_state(x: SEXP) -> SEXP
Return serialization state.
Source§const GUARD: AltrepGuard = AltrepGuard::RUnwind
const GUARD: AltrepGuard = AltrepGuard::RUnwind
The guard mode for native reads and inspection on this type. Read more
Source§const HAS_UNSERIALIZE_EX: bool = false
const HAS_UNSERIALIZE_EX: bool = false
Set to
true to register unserialize_ex.Source§fn unserialize_ex(
_class: SEXP,
_state: SEXP,
_attr: SEXP,
_objf: i32,
_levs: i32,
) -> SEXP
fn unserialize_ex( _class: SEXP, _state: SEXP, _attr: SEXP, _objf: i32, _levs: i32, ) -> SEXP
Extended unserialization with attributes.
Source§const HAS_DUPLICATE: bool = false
const HAS_DUPLICATE: bool = false
Set to
true to register duplicate.Source§const HAS_DUPLICATE_EX: bool = false
const HAS_DUPLICATE_EX: bool = false
Set to
true to register duplicate_ex.Source§const HAS_COERCE: bool = false
const HAS_COERCE: bool = false
Set to
true to register coerce.Source§const HAS_INSPECT: bool = false
const HAS_INSPECT: bool = false
Set to
true to register inspect.Auto Trait Implementations§
impl<T> Forget for Carrier<T>
impl<T> Freeze for Carrier<T>where
PhantomData<T>: Freeze,
impl<T> RefUnwindSafe for Carrier<T>where
PhantomData<T>: RefUnwindSafe,
impl<T> Send for Carrier<T>where
PhantomData<T>: Send,
impl<T> Sync for Carrier<T>where
PhantomData<T>: Sync,
impl<T> Unpin for Carrier<T>where
PhantomData<T>: Unpin,
impl<T> UnsafeUnpin for Carrier<T>where
PhantomData<T>: UnsafeUnpin,
impl<T> UnwindSafe for Carrier<T>where
PhantomData<T>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> SizeHint for Twhere
T: ?Sized,
impl<T> SizeHint for Twhere
T: ?Sized,
Source§default fn lower_bound(&self) -> usize
default fn lower_bound(&self) -> usize
🔬This is a nightly-only experimental API. (
core_io_internals)Returns a lower bound on the number of elements this container-like item
contains.
For example, an array
[u8; 12] could return any value between 0 and
12 inclusively as a correct implementation. Read moreSource§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)]const SIZE: usize
#[doc(hidden)]const SIZE: usize
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const ALIGN: usize
#[doc(hidden)]const ALIGN: usize
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const ALIGNMENT: Alignment
#[doc(hidden)]const ALIGNMENT: Alignment
🔬This is a nightly-only experimental API. (
ptr_alignment_type)Source§#[doc(hidden)]const IS_ZST: bool
#[doc(hidden)]const IS_ZST: bool
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const LAYOUT: Layout
#[doc(hidden)]const LAYOUT: Layout
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const MAX_SLICE_LEN: usize
#[doc(hidden)]const MAX_SLICE_LEN: usize
🔬This is a nightly-only experimental API. (
sized_type_properties)The largest safe length for a
[Self]. Read moreLayout§
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: 0 bytes