pub struct SEXP<T: RType> { /* private fields */ }Expand description
ReadOnly SEXP, should not be changed.
This is the preferred way for accept ffi values
Since R marked the input values as readonly.
Trait Implementations§
source§impl<T: RType> SExt for SEXP<T>
impl<T: RType> SExt for SEXP<T>
source§fn new(len: <Self::Data as RType>::New) -> Self
fn new(len: <Self::Data as RType>::New) -> Self
allocate a new SEXP object with length
for
u8 (CHARcrate::libR::SEXP), new with length is not allowed
thus CHARcrate::libR::SEXP accept a String object.source§fn is_correct_type(&self) -> bool
fn is_correct_type(&self) -> bool
check whether the data has the desired type
source§unsafe fn data_unchecked(&self) -> &[<Self::Data as RType>::Data]
unsafe fn data_unchecked(&self) -> &[<Self::Data as RType>::Data]
got the read-only data of a SEXP object
SAFETY: caller should ensure this SEXP has data with Read more
impl<T: Copy + RType> Copy for SEXP<T>
Auto Trait Implementations§
impl<T> Freeze for SEXP<T>
impl<T> RefUnwindSafe for SEXP<T>where
T: RefUnwindSafe,
impl<T> !Send for SEXP<T>
impl<T> !Sync for SEXP<T>
impl<T> Unpin for SEXP<T>where
T: Unpin,
impl<T> UnwindSafe for SEXP<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
Mutably borrows from an owned value. Read more