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]);
}

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.