Skip to main content

StrictRInt

Trait StrictRInt 

Source
#[doc(hidden)]
pub trait StrictRInt: Copy + Display { const NAME: &'static str; // Required methods fn to_r_int(self) -> Option<i32>; fn range_reason(self) -> String; }
Expand description

A lossy integer type for the strict outbound path: its R integer, if any, and the reason it has none.

Required Associated Constants§

Source

const NAME: &'static str

The Rust type name the panic message uses.

Required Methods§

Source

fn to_r_int(self) -> Option<i32>

Some when the value is an R integer: it fits i32 and is not i32::MIN, which is NA_integer_ in R.

Source

fn range_reason(self) -> String

Why self has no R integer.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl StrictRInt for i64

Source§

const NAME: &'static str = "i64"

Source§

fn to_r_int(self) -> Option<i32>

Source§

fn range_reason(self) -> String

Source§

impl StrictRInt for isize

Source§

const NAME: &'static str = "isize"

Source§

fn to_r_int(self) -> Option<i32>

Source§

fn range_reason(self) -> String

Source§

impl StrictRInt for u64

Source§

const NAME: &'static str = "u64"

Source§

fn to_r_int(self) -> Option<i32>

Source§

fn range_reason(self) -> String

Source§

impl StrictRInt for usize

Source§

const NAME: &'static str = "usize"

Source§

fn to_r_int(self) -> Option<i32>

Source§

fn range_reason(self) -> String

Implementors§