#[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§
impl<T: Copy> Copy for Altrep<T>
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: PartialEq> 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,
impl<T> Printable for T
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
core_io_internals)[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 = _
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 moreLayout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.