#[repr(transparent)]pub struct Altrep<T>(pub T);Tuple Fields§
§0: TImplementations§
Source§impl<T> Altrep<T>
impl<T> Altrep<T>
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Unwrap and return the inner value.
Sourcepub fn into_altrep_sexp(self) -> AltrepSexpwhere
T: RegisterAltrep + TypedExternal,
pub fn into_altrep_sexp(self) -> AltrepSexpwhere
T: RegisterAltrep + TypedExternal,
Convert to R ALTREP and wrap in AltrepSexp (!Send + !Sync).
This creates the ALTREP SEXP and wraps it in an AltrepSexp that
prevents the result from being sent to non-R threads. Use this when
you need to keep the ALTREP vector in Rust code and want compile-time
thread safety guarantees.
For returning directly to R from #[miniextendr] functions, use
Altrep<T> as the return type (which implements IntoR) or call
.into_sexp() / .into_sexp_altrep() instead.
Trait Implementations§
Source§impl<T: Eq> Eq for Altrep<T>
impl<T: Eq> Eq for Altrep<T>
Source§#[doc(hidden)]fn assert_fields_are_eq(&self)
#[doc(hidden)]fn assert_fields_are_eq(&self)
derive_eq_internals)1.0.0 (const: unstable) · Source§#[doc(hidden)]fn assert_receiver_is_total_eq(&self)
#[doc(hidden)]fn assert_receiver_is_total_eq(&self)
implementation detail of #[derive(Eq)]
Source§impl<T> IntoR for Altrep<T>where
T: RegisterAltrep + TypedExternal,
Convert Altrep<T> to R using ALTREP representation.
impl<T> IntoR for Altrep<T>where
T: RegisterAltrep + TypedExternal,
Convert Altrep<T> to R using ALTREP representation.
This creates an ALTREP object where the data stays in Rust and is provided to R on-demand through ALTREP callbacks.
Source§type Error = Infallible
type Error = Infallible
Source§fn try_into_sexp(self) -> Result<SEXP, Self::Error>
fn try_into_sexp(self) -> Result<SEXP, Self::Error>
Source§unsafe fn try_into_sexp_unchecked(self) -> Result<SEXP, Self::Error>
unsafe fn try_into_sexp_unchecked(self) -> Result<SEXP, Self::Error>
Source§unsafe fn into_sexp_unchecked(self) -> SEXP
unsafe fn into_sexp_unchecked(self) -> SEXP
impl<T: Copy> Copy for Altrep<T>
impl<T> StructuralPartialEq for Altrep<T>
Auto Trait Implementations§
impl<T> Freeze for Altrep<T>where
T: Freeze,
impl<T> RefUnwindSafe for Altrep<T>where
T: RefUnwindSafe,
impl<T> Send for Altrep<T>where
T: Send,
impl<T> Sync for Altrep<T>where
T: Sync,
impl<T> Unpin for Altrep<T>where
T: Unpin,
impl<T> UnsafeUnpin for Altrep<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Altrep<T>where
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> SizeEq<MaybeUninit<T>> for T
impl<T> SizeEq<MaybeUninit<T>> for T
type CastFrom = CastSizedExact
Source§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)]const SIZE: usize = _
#[doc(hidden)]const SIZE: usize = _
sized_type_properties)Source§#[doc(hidden)]const ALIGN: usize = _
#[doc(hidden)]const ALIGN: usize = _
sized_type_properties)Source§#[doc(hidden)]const ALIGNMENT: Alignment = _
#[doc(hidden)]const ALIGNMENT: Alignment = _
ptr_alignment_type)Source§#[doc(hidden)]const IS_ZST: bool = _
#[doc(hidden)]const IS_ZST: bool = _
sized_type_properties)Source§#[doc(hidden)]const LAYOUT: Layout = _
#[doc(hidden)]const LAYOUT: Layout = _
sized_type_properties)Source§#[doc(hidden)]const MAX_SLICE_LEN: usize = _
#[doc(hidden)]const MAX_SLICE_LEN: usize = _
sized_type_properties)[Self]. Read moreimpl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> InvariantsEq<ManuallyDrop<T>> for Twhere
T: ?Sized,
impl<T> InvariantsEq<T> for Twhere
T: ?Sized,
impl<T> InvariantsEq<Unalign<T>> for T
impl<T> InvariantsEq<Wrapping<T>> for T
impl<Src, Dst, A, SV, DV, R> MutationCompatible<Src, A, SV, DV, (BecauseRead, R)> for Dst
impl<Src, Dst, A, SV, DV> MutationCompatible<Src, A, SV, DV, BecauseInvariantsEq> for Dstwhere
A: Aliasing,
SV: Validity,
DV: Validity,
Src: TransmuteFrom<Dst, DV, SV> + ?Sized,
Dst: TransmuteFrom<Src, SV, DV> + InvariantsEq<Src> + ?Sized,
impl<T> Printable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> TransmuteFrom<Cell<T>, Valid, Valid> for Twhere
T: ?Sized,
impl<T> TransmuteFrom<ManuallyDrop<T>, Valid, Valid> for Twhere
T: ?Sized,
impl<T> TransmuteFrom<ReadOnly<T>, Valid, Valid> for Twhere
T: ?Sized,
impl<Src, Dst> TransmuteFrom<Src, Initialized, Initialized> for Dst
impl<Src, Dst, V> TransmuteFrom<Src, V, Uninit> for Dst
impl<Src, Dst> TransmuteFrom<Src, Valid, Initialized> for Dst
impl<T> TransmuteFrom<Unalign<T>, Valid, Valid> for T
impl<T> TransmuteFrom<UnsafeCell<T>, Valid, Valid> for Twhere
T: ?Sized,
impl<T> TransmuteFrom<Wrapping<T>, Valid, Valid> for T
impl<Src, Dst, A, SV, DV, C, R> TransmuteFromPtr<Src, A, SV, DV, C, R> for Dstwhere
A: Aliasing,
SV: Validity,
DV: Validity,
C: CastExact<Src, Dst>,
Dst: TransmuteFrom<Src, SV, DV> + TryTransmuteFromPtr<Src, A, SV, DV, C, R> + ?Sized,
Src: ?Sized,
impl<Src, Dst, SV, DV, A, C, R> TryTransmuteFromPtr<Src, A, SV, DV, C, (BecauseMutationCompatible, R)> for Dstwhere
A: Aliasing,
SV: Validity,
DV: Validity,
Src: TransmuteFrom<Dst, DV, SV> + ?Sized,
Dst: MutationCompatible<Src, A, SV, DV, R> + ?Sized,
C: CastExact<Src, Dst>,
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.