Skip to main content

Array

Trait Array 

Source
pub trait Array {
    type Builder;
    type OwnedItem;
    type RefItem<'a>;

    // Required methods
    fn get(&self, row: usize) -> Option<Self::RefItem<'_>>;
    fn len(&self) -> usize;
    fn from_slice(items: &[Option<Self::RefItem<'_>>]) -> Self;

    // Provided methods
    fn is_empty(&self) -> bool { ... }
    fn iter<'a>(
        &'a self,
    ) -> impl Iterator<Item = Option<Self::RefItem<'a>>> + 'a { ... }
}
Expand description

Checkpoint 1: add the bounds connecting an array to its scalar and builder forms.

Required Associated Types§

Required Methods§

Source

fn get(&self, row: usize) -> Option<Self::RefItem<'_>>

Source

fn len(&self) -> usize

Source

fn from_slice(items: &[Option<Self::RefItem<'_>>]) -> Self

Provided Methods§

Source

fn is_empty(&self) -> bool

Source

fn iter<'a>(&'a self) -> impl Iterator<Item = Option<Self::RefItem<'a>>> + 'a

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§