extendr_api::wrapper::matrix

Type Alias RColumn

Source
pub type RColumn<T> = RArray<T, [usize; 1]>;

Aliased Type§

struct RColumn<T> {
    robj: Robj,
    dim: [usize; 1],
    _data: PhantomData<T>,
}

Fields§

§robj: Robj

Owning Robj (probably should be a Pin).

§dim: [usize; 1]

Dimensions of the array.

§_data: PhantomData<T>

Implementations§

Source§

impl<T> RColumn<T>
where T: ToVectorValue, Robj: for<'a> AsTypedSlice<'a, T>,

Source

pub fn new_column<F: FnMut(usize) -> T>(nrows: usize, f: F) -> Self

Make a new column type.

Source

pub fn nrows(&self) -> usize

Get the number of rows.

Trait Implementations§

Source§

impl<T> TryFrom<&Robj> for RColumn<T>
where Robj: for<'a> AsTypedSlice<'a, T>,

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(robj: &Robj) -> Result<Self>

Performs the conversion.
Source§

impl<T> TryFrom<Robj> for RColumn<T>
where Robj: for<'a> AsTypedSlice<'a, T>,

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(robj: Robj) -> Result<Self>

Performs the conversion.