Struct extendr_api::scalar::Rint
source · pub struct Rint(pub i32);
Expand description
Rint is a wrapper for i32 in the context of an R’s integer vector.
Rint can have a value between i32::MIN+1 and i32::MAX
The value i32::MIN is used as “NA”.
Rint has the same footprint as an i32 value allowing us to use it in zero copy slices.
Tuple Fields§
§0: i32
Implementations§
Trait Implementations§
source§impl AddAssign<Rint> for &mut Rint
impl AddAssign<Rint> for &mut Rint
source§fn add_assign(&mut self, other: Rint)
fn add_assign(&mut self, other: Rint)
Add two Rint values or an option of i32, modifying the left-hand side in place. Overflows to NA.
source§impl AddAssign<Rint> for Option<i32>
impl AddAssign<Rint> for Option<i32>
source§fn add_assign(&mut self, other: Rint)
fn add_assign(&mut self, other: Rint)
Add two Rint values or an option of i32, modifying the left-hand side in place. Overflows to NA.
source§impl AddAssign<Rint> for Rint
impl AddAssign<Rint> for Rint
source§fn add_assign(&mut self, other: Rint)
fn add_assign(&mut self, other: Rint)
Add two Rint values or an option of i32, modifying the left-hand side in place. Overflows to NA.
source§impl AddAssign<i32> for &mut Rint
impl AddAssign<i32> for &mut Rint
source§fn add_assign(&mut self, other: i32)
fn add_assign(&mut self, other: i32)
Add two Rint values or an option of i32, modifying the left-hand side in place. Overflows to NA.
source§impl AddAssign<i32> for Rint
impl AddAssign<i32> for Rint
source§fn add_assign(&mut self, other: i32)
fn add_assign(&mut self, other: i32)
Add two Rint values or an option of i32, modifying the left-hand side in place. Overflows to NA.
source§impl<'a> AsTypedSlice<'a, Rint> for Robjwhere
Self: 'a,
impl<'a> AsTypedSlice<'a, Rint> for Robjwhere Self: 'a,
fn as_typed_slice(&self) -> Option<&'a [Rint]>
fn as_typed_slice_mut(&mut self) -> Option<&'a mut [Rint]>
source§impl CanBeNA for Rint
impl CanBeNA for Rint
use extendr_api::prelude::*;
test! {
assert!((<Rint>::na()).is_na());
}
source§impl Default for Rint
impl Default for Rint
use extendr_api::prelude::*;
test! {
assert_eq!(<Rint>::default(), <i32>::default());
}
source§impl DivAssign<Rint> for &mut Rint
impl DivAssign<Rint> for &mut Rint
source§fn div_assign(&mut self, other: Rint)
fn div_assign(&mut self, other: Rint)
Divide two Rint values or an option of i32, modifying the left-hand side in place. Overflows to NA.
source§impl DivAssign<Rint> for Option<i32>
impl DivAssign<Rint> for Option<i32>
source§fn div_assign(&mut self, other: Rint)
fn div_assign(&mut self, other: Rint)
Divide two Rint values or an option of i32, modifying the left-hand side in place. Overflows to NA.
source§impl DivAssign<Rint> for Rint
impl DivAssign<Rint> for Rint
source§fn div_assign(&mut self, other: Rint)
fn div_assign(&mut self, other: Rint)
Divide two Rint values or an option of i32, modifying the left-hand side in place. Overflows to NA.
source§impl DivAssign<i32> for &mut Rint
impl DivAssign<i32> for &mut Rint
source§fn div_assign(&mut self, other: i32)
fn div_assign(&mut self, other: i32)
Divide two Rint values or an option of i32, modifying the left-hand side in place. Overflows to NA.
source§impl DivAssign<i32> for Rint
impl DivAssign<i32> for Rint
source§fn div_assign(&mut self, other: i32)
fn div_assign(&mut self, other: i32)
Divide two Rint values or an option of i32, modifying the left-hand side in place. Overflows to NA.
source§impl FromIterator<Rint> for Integers
impl FromIterator<Rint> for Integers
source§fn from_iter<T: IntoIterator<Item = Rint>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = Rint>>(iter: T) -> Self
A more generalised iterator collector for small vectors. Generates a non-ALTREP vector.
source§impl MulAssign<Rint> for &mut Rint
impl MulAssign<Rint> for &mut Rint
source§fn mul_assign(&mut self, other: Rint)
fn mul_assign(&mut self, other: Rint)
Multiply two Rint values or an option of i32, modifying the left-hand side in place. Overflows to NA.
source§impl MulAssign<Rint> for Option<i32>
impl MulAssign<Rint> for Option<i32>
source§fn mul_assign(&mut self, other: Rint)
fn mul_assign(&mut self, other: Rint)
Multiply two Rint values or an option of i32, modifying the left-hand side in place. Overflows to NA.
source§impl MulAssign<Rint> for Rint
impl MulAssign<Rint> for Rint
source§fn mul_assign(&mut self, other: Rint)
fn mul_assign(&mut self, other: Rint)
Multiply two Rint values or an option of i32, modifying the left-hand side in place. Overflows to NA.
source§impl MulAssign<i32> for &mut Rint
impl MulAssign<i32> for &mut Rint
source§fn mul_assign(&mut self, other: i32)
fn mul_assign(&mut self, other: i32)
Multiply two Rint values or an option of i32, modifying the left-hand side in place. Overflows to NA.
source§impl MulAssign<i32> for Rint
impl MulAssign<i32> for Rint
source§fn mul_assign(&mut self, other: i32)
fn mul_assign(&mut self, other: i32)
Multiply two Rint values or an option of i32, modifying the left-hand side in place. Overflows to NA.
source§impl PartialEq<Rint> for Rint
impl PartialEq<Rint> for Rint
use extendr_api::prelude::*;
test! {
assert!(<Rint>::default().eq(&<Rint>::default()));
assert!(!<Rint>::na().eq(&<Rint>::na()));
}
source§impl PartialEq<i32> for &Rint
impl PartialEq<i32> for &Rint
use extendr_api::prelude::*;
test! {
assert!(<Rint>::default().eq(&<i32>::default()));
}
source§impl PartialEq<i32> for Rint
impl PartialEq<i32> for Rint
use extendr_api::prelude::*;
test! {
assert!(<Rint>::default().eq(&<i32>::default()));
}
source§impl SubAssign<Rint> for &mut Rint
impl SubAssign<Rint> for &mut Rint
source§fn sub_assign(&mut self, other: Rint)
fn sub_assign(&mut self, other: Rint)
Subtract two Rint values or an option of i32, modifying the left-hand side in place. Overflows to NA.
source§impl SubAssign<Rint> for Option<i32>
impl SubAssign<Rint> for Option<i32>
source§fn sub_assign(&mut self, other: Rint)
fn sub_assign(&mut self, other: Rint)
Subtract two Rint values or an option of i32, modifying the left-hand side in place. Overflows to NA.
source§impl SubAssign<Rint> for Rint
impl SubAssign<Rint> for Rint
source§fn sub_assign(&mut self, other: Rint)
fn sub_assign(&mut self, other: Rint)
Subtract two Rint values or an option of i32, modifying the left-hand side in place. Overflows to NA.
source§impl SubAssign<i32> for &mut Rint
impl SubAssign<i32> for &mut Rint
source§fn sub_assign(&mut self, other: i32)
fn sub_assign(&mut self, other: i32)
Subtract two Rint values or an option of i32, modifying the left-hand side in place. Overflows to NA.
source§impl SubAssign<i32> for Rint
impl SubAssign<i32> for Rint
source§fn sub_assign(&mut self, other: i32)
fn sub_assign(&mut self, other: i32)
Subtract two Rint values or an option of i32, modifying the left-hand side in place. Overflows to NA.