Struct aorist_extendr_api::wrapper::list::FromList [−][src]
pub struct FromList<T>(pub T);
Expand description
You can use the FromList wrapper to coerce a Robj into a list.
use extendr_api::prelude::*; test! { let list = list!(1, 2); let vec : FromList<Vec<i32>> = list.try_into()?; assert_eq!(vec.0, vec![1, 2]); }
Trait Implementations
You can use the FromList wrapper to coerce a Robj into a list.
use extendr_api::prelude::*; test! { let list = list!(1, 2); let vec : FromList<Vec<i32>> = list.try_into()?; assert_eq!(vec.0, vec![1, 2]); }
Auto Trait Implementations
impl<T> RefUnwindSafe for FromList<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for FromList<T> where
T: UnwindSafe,