extendr_api/scalar/
mod.rs

1mod macros;
2mod rbool;
3mod rfloat;
4mod rint;
5pub use rbool::Rbool;
6pub use rfloat::Rfloat;
7pub use rint::Rint;
8
9#[cfg(feature = "num-complex")]
10mod rcplx_full;
11
12#[cfg(feature = "num-complex")]
13pub use rcplx_full::{c64, Rcplx};
14
15#[cfg(not(feature = "num-complex"))]
16mod rcplx_default;
17
18#[cfg(not(feature = "num-complex"))]
19pub use rcplx_default::{c64, Rcplx};
20
21pub trait Scalar<T>: crate::CanBeNA
22where
23    T: PartialEq + Copy,
24{
25    fn inner(&self) -> T;
26    fn new(val: T) -> Self;
27}