Struct extendr_api::wrapper::List [−][src]
Wrapper for creating list (VECSXP) objects.
use extendr_api::prelude::*; test! { let list = r!(List(&[r!(0), r!(1), r!(2)])); assert_eq!(list.is_list(), true); assert_eq!(list.len(), 3); assert_eq!(format!("{:?}", list), r#"r!(List([r!(0), r!(1), r!(2)]))"#); }
Note: you can use the list! macro for named lists.
Trait Implementations
impl<T: Clone> Clone for List<T>
[src]
impl<T: Debug> Debug for List<T>
[src]
impl<T> From<List<T>> for Robj where
T: IntoIterator,
T::IntoIter: ExactSizeIterator,
T::Item: Into<Robj>,
[src]
T: IntoIterator,
T::IntoIter: ExactSizeIterator,
T::Item: Into<Robj>,
fn from(val: List<T>) -> Self
[src]
Make a list object from an iterator of Robjs.
use extendr_api::prelude::*; test! { let list_of_ints = r!(List(&[1, 2])); assert_eq!(list_of_ints.len(), 2); }
impl<T: PartialEq> PartialEq<List<T>> for List<T>
[src]
impl<T> StructuralPartialEq for List<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for List<T> where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,
impl<T> Send for List<T> where
T: Send,
[src]
T: Send,
impl<T> Sync for List<T> where
T: Sync,
[src]
T: Sync,
impl<T> Unpin for List<T> where
T: Unpin,
[src]
T: Unpin,
impl<T> UnwindSafe for List<T> where
T: UnwindSafe,
[src]
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,