logo
pub trait Length: GetSexp {
    fn len(&self) -> usize { ... }
    fn is_empty(&self) -> bool { ... }
}

Provided methods

Get the extended length of the object.

use extendr_api::prelude::*;
test! {

let a : Robj = r!(vec![1., 2., 3., 4.]);
assert_eq!(a.len(), 4);
}

Returns true if the Robj contains no elements.

use extendr_api::prelude::*;
test! {

let a : Robj = r!(vec![0.; 0]); // length zero of numeric vector
assert_eq!(a.is_empty(), true);
}

Implementors

len() and is_empty()

len() and is_empty()

len() and is_empty()

len() and is_empty()

len() and is_empty()

len() and is_empty()

len() and is_empty()

len() and is_empty()

len() and is_empty()

len() and is_empty()

len() and is_empty()

len() and is_empty()

len() and is_empty()

len() and is_empty()

len() and is_empty()

len() and is_empty()

len() and is_empty()

len() and is_empty()

len() and is_empty()

len() and is_empty()