Trait extendr_api::robj::into_robj::ToVectorValue

source ·
pub trait ToVectorValue {
    // Provided methods
    fn sexptype() -> SEXPTYPE { ... }
    fn to_real(&self) -> f64
       where Self: Sized { ... }
    fn to_complex(&self) -> Rcomplex
       where Self: Sized { ... }
    fn to_integer(&self) -> i32
       where Self: Sized { ... }
    fn to_logical(&self) -> i32
       where Self: Sized { ... }
    fn to_raw(&self) -> u8
       where Self: Sized { ... }
    fn to_sexp(&self) -> SEXP
       where Self: Sized { ... }
}
Expand description

ToVectorValue is a trait that allows many different types to be converted to vectors. It is used as a type parameter to collect_robj().

Provided Methods§

source

fn sexptype() -> SEXPTYPE

source

fn to_real(&self) -> f64
where Self: Sized,

source

fn to_complex(&self) -> Rcomplex
where Self: Sized,

source

fn to_integer(&self) -> i32
where Self: Sized,

source

fn to_logical(&self) -> i32
where Self: Sized,

source

fn to_raw(&self) -> u8
where Self: Sized,

source

fn to_sexp(&self) -> SEXP
where Self: Sized,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ToVectorValue for &&str

source§

fn sexptype() -> SEXPTYPE

source§

fn to_sexp(&self) -> SEXP
where Self: Sized,

source§

impl ToVectorValue for &(f64, f64)

source§

fn sexptype() -> SEXPTYPE

source§

fn to_complex(&self) -> Rcomplex

source§

impl ToVectorValue for &bool

source§

fn sexptype() -> SEXPTYPE

source§

fn to_logical(&self) -> i32
where Self: Sized,

source§

impl ToVectorValue for &f32

source§

fn sexptype() -> SEXPTYPE

source§

fn to_real(&self) -> f64

source§

impl ToVectorValue for &f64

source§

fn sexptype() -> SEXPTYPE

source§

fn to_real(&self) -> f64

source§

impl ToVectorValue for &i8

source§

fn sexptype() -> SEXPTYPE

source§

fn to_integer(&self) -> i32

source§

impl ToVectorValue for &i16

source§

fn sexptype() -> SEXPTYPE

source§

fn to_integer(&self) -> i32

source§

impl ToVectorValue for &i32

source§

fn sexptype() -> SEXPTYPE

source§

fn to_integer(&self) -> i32

source§

impl ToVectorValue for &i64

source§

fn sexptype() -> SEXPTYPE

source§

fn to_real(&self) -> f64

source§

impl ToVectorValue for &str

source§

fn sexptype() -> SEXPTYPE

source§

fn to_sexp(&self) -> SEXP
where Self: Sized,

source§

impl ToVectorValue for &u8

source§

fn sexptype() -> SEXPTYPE

source§

fn to_raw(&self) -> u8

source§

impl ToVectorValue for &u16

source§

fn sexptype() -> SEXPTYPE

source§

fn to_integer(&self) -> i32

source§

impl ToVectorValue for &u32

source§

fn sexptype() -> SEXPTYPE

source§

fn to_real(&self) -> f64

source§

impl ToVectorValue for &u64

source§

fn sexptype() -> SEXPTYPE

source§

fn to_real(&self) -> f64

source§

impl ToVectorValue for &usize

source§

fn sexptype() -> SEXPTYPE

source§

fn to_real(&self) -> f64

source§

impl ToVectorValue for &String

source§

fn sexptype() -> SEXPTYPE

source§

fn to_sexp(&self) -> SEXP
where Self: Sized,

source§

impl ToVectorValue for (f64, f64)

source§

fn sexptype() -> SEXPTYPE

source§

fn to_complex(&self) -> Rcomplex

source§

impl ToVectorValue for Option<&str>

source§

fn sexptype() -> SEXPTYPE

source§

fn to_sexp(&self) -> SEXP
where Self: Sized,

source§

impl ToVectorValue for Option<bool>

source§

fn sexptype() -> SEXPTYPE

source§

fn to_logical(&self) -> i32

source§

impl ToVectorValue for Option<f32>

source§

fn sexptype() -> SEXPTYPE

source§

fn to_real(&self) -> f64

source§

impl ToVectorValue for Option<f64>

source§

fn sexptype() -> SEXPTYPE

source§

fn to_real(&self) -> f64

source§

impl ToVectorValue for Option<i8>

source§

fn sexptype() -> SEXPTYPE

source§

fn to_integer(&self) -> i32

source§

impl ToVectorValue for Option<i16>

source§

fn sexptype() -> SEXPTYPE

source§

fn to_integer(&self) -> i32

source§

impl ToVectorValue for Option<i32>

source§

fn sexptype() -> SEXPTYPE

source§

fn to_integer(&self) -> i32

source§

impl ToVectorValue for Option<i64>

source§

fn sexptype() -> SEXPTYPE

source§

fn to_real(&self) -> f64

source§

impl ToVectorValue for Option<u16>

source§

fn sexptype() -> SEXPTYPE

source§

fn to_integer(&self) -> i32

source§

impl ToVectorValue for Option<u32>

source§

fn sexptype() -> SEXPTYPE

source§

fn to_real(&self) -> f64

source§

impl ToVectorValue for Option<u64>

source§

fn sexptype() -> SEXPTYPE

source§

fn to_real(&self) -> f64

source§

impl ToVectorValue for Option<usize>

source§

fn sexptype() -> SEXPTYPE

source§

fn to_real(&self) -> f64

source§

impl ToVectorValue for Option<String>

source§

fn sexptype() -> SEXPTYPE

source§

fn to_sexp(&self) -> SEXP
where Self: Sized,

source§

impl ToVectorValue for bool

source§

fn sexptype() -> SEXPTYPE

source§

fn to_logical(&self) -> i32
where Self: Sized,

source§

impl ToVectorValue for f32

source§

fn sexptype() -> SEXPTYPE

source§

fn to_real(&self) -> f64

source§

impl ToVectorValue for f64

source§

fn sexptype() -> SEXPTYPE

source§

fn to_real(&self) -> f64

source§

impl ToVectorValue for i8

source§

fn sexptype() -> SEXPTYPE

source§

fn to_integer(&self) -> i32

source§

impl ToVectorValue for i16

source§

fn sexptype() -> SEXPTYPE

source§

fn to_integer(&self) -> i32

source§

impl ToVectorValue for i32

source§

fn sexptype() -> SEXPTYPE

source§

fn to_integer(&self) -> i32

source§

impl ToVectorValue for i64

source§

fn sexptype() -> SEXPTYPE

source§

fn to_real(&self) -> f64

source§

impl ToVectorValue for u8

source§

fn sexptype() -> SEXPTYPE

source§

fn to_raw(&self) -> u8

source§

impl ToVectorValue for u16

source§

fn sexptype() -> SEXPTYPE

source§

fn to_integer(&self) -> i32

source§

impl ToVectorValue for u32

source§

fn sexptype() -> SEXPTYPE

source§

fn to_real(&self) -> f64

source§

impl ToVectorValue for u64

source§

fn sexptype() -> SEXPTYPE

source§

fn to_real(&self) -> f64

source§

impl ToVectorValue for usize

source§

fn sexptype() -> SEXPTYPE

source§

fn to_real(&self) -> f64

source§

impl ToVectorValue for String

source§

fn sexptype() -> SEXPTYPE

source§

fn to_sexp(&self) -> SEXP
where Self: Sized,

Implementors§