#[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 Eq for RLogical
impl Eq for RLogical
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 IntoR for RLogical
impl IntoR for RLogical
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
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
Source§fn try_coerce(self) -> Result<bool, LogicalCoerceError>
fn try_coerce(self) -> Result<bool, LogicalCoerceError>
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 StructuralPartialEq for RLogical
impl TrivialClone 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>
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
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: 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: 4 bytes