#[repr(transparent)]pub struct RLogical(i32);Expand description
R’s logical element type (the contents of a LGLSXP vector).
In R, logical vectors are stored as int with possible values:
0for FALSE1for TRUENA_LOGICAL(typicallyINT_MIN) for NA
Important: R may also contain other non-zero values in logical vectors (e.g., from low-level code). Those should be interpreted as TRUE.
This type is repr(transparent) over i32 so any raw value is valid,
avoiding UB when viewing LGLSXP data as a slice.
Tuple Fields§
§0: i32Implementations§
Trait Implementations§
Source§impl IntoR for RLogical
impl IntoR for RLogical
Source§type Error = Infallible
type Error = Infallible
The error type for fallible conversions. Read more
Source§fn try_into_sexp(self) -> Result<SEXP, Self::Error>
fn try_into_sexp(self) -> Result<SEXP, Self::Error>
Try to convert this value to an R SEXP. Read more
Source§unsafe fn try_into_sexp_unchecked(self) -> Result<SEXP, Self::Error>
unsafe fn try_into_sexp_unchecked(self) -> Result<SEXP, Self::Error>
Try to convert to SEXP without thread safety checks. Read more
Source§unsafe fn into_sexp_unchecked(self) -> SEXP
unsafe fn into_sexp_unchecked(self) -> SEXP
Convert to SEXP without thread safety checks, panicking on error. Read more
Source§impl RNativeType for RLogical
impl RNativeType for RLogical
Source§impl TryCoerce<bool> for RLogical
impl TryCoerce<bool> for RLogical
Source§type Error = LogicalCoerceError
type Error = LogicalCoerceError
Error returned when coercion fails.
Source§fn try_coerce(self) -> Result<bool, LogicalCoerceError>
fn try_coerce(self) -> Result<bool, LogicalCoerceError>
Attempt to convert
self into R.Source§impl TryFromSexp for &'static RLogical
impl TryFromSexp for &'static RLogical
Source§impl TryFromSexp for &'static mut RLogical
§Safety note (aliasing)
This impl can produce aliased &mut references if the same R object
is passed to multiple mutable parameters. The caller (generated wrapper)
is responsible for ensuring no two &mut borrows alias the same SEXP.
impl TryFromSexp for &'static mut RLogical
§Safety note (aliasing)
This impl can produce aliased &mut references if the same R object
is passed to multiple mutable parameters. The caller (generated wrapper)
is responsible for ensuring no two &mut borrows alias the same SEXP.
Source§impl TryFromSexp for RLogical
impl TryFromSexp for RLogical
impl Copy for RLogical
impl Eq for RLogical
impl StructuralPartialEq for RLogical
Auto Trait Implementations§
impl Freeze for RLogical
impl RefUnwindSafe for RLogical
impl Send for RLogical
impl Sync for RLogical
impl Unpin for RLogical
impl UnsafeUnpin for RLogical
impl UnwindSafe for RLogical
Blanket Implementations§
Source§impl<T> AsRNativeExt for Twhere
T: RNativeType,
impl<T> AsRNativeExt for Twhere
T: RNativeType,
Source§fn wrap_r_native(self) -> AsRNative<Self>
fn wrap_r_native(self) -> AsRNative<Self>
Wrap
self in AsRNative for native R scalar conversion.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