Skip to main content

AltStringData

Trait AltStringData 

Source
pub trait AltStringData: AltrepLen {
    // Required method
    fn elt(&self, i: usize) -> Option<&str>;

    // Provided methods
    fn is_sorted(&self) -> Option<Sortedness> { ... }
    fn no_na(&self) -> Option<bool> { ... }
}
Expand description

Trait for types that can back an ALTSTRING vector.

Note: elt returns a &str which will be converted to CHARSXP.

Required Methods§

Source

fn elt(&self, i: usize) -> Option<&str>

Get the string element at index i.

Return None for NA values.

Provided Methods§

Source

fn is_sorted(&self) -> Option<Sortedness>

Optional: sortedness hint.

Source

fn no_na(&self) -> Option<bool>

Optional: does this vector contain any NA values?

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl AltStringData for &[&str]

Source§

fn elt(&self, i: usize) -> Option<&str>

Source§

impl AltStringData for &[String]

Source§

fn elt(&self, i: usize) -> Option<&str>

Source§

impl AltStringData for Box<[String]>

Source§

fn elt(&self, i: usize) -> Option<&str>

Source§

fn no_na(&self) -> Option<bool>

Source§

impl AltStringData for Vec<Cow<'static, str>>

Source§

fn elt(&self, i: usize) -> Option<&str>

Source§

fn no_na(&self) -> Option<bool>

Source§

impl AltStringData for Vec<Option<Cow<'static, str>>>

Source§

fn elt(&self, i: usize) -> Option<&str>

Source§

fn no_na(&self) -> Option<bool>

Source§

impl AltStringData for Vec<Option<String>>

Source§

fn elt(&self, i: usize) -> Option<&str>

Source§

fn no_na(&self) -> Option<bool>

Source§

impl AltStringData for Vec<String>

Source§

fn elt(&self, i: usize) -> Option<&str>

Source§

fn no_na(&self) -> Option<bool>

Source§

impl<const N: usize> AltStringData for [String; N]

Source§

fn elt(&self, i: usize) -> Option<&str>

Implementors§

Source§

impl<I> AltStringData for IterStringData<I>
where I: Iterator<Item = String>,