Trait handlegraph::packed::traits::Viewable[][src]

pub trait Viewable: PackedCollection + Sized {
    fn view<T>(&self, index: usize) -> ViewRef<'_, Self, T>
    where
        T: PackedElement
; fn get_unpack<T>(&self, index: usize) -> T
    where
        T: PackedElement
, { ... } }

A Viewable is a PackedCollection that we can get a "view" into a single element of. This lets us get a "reference" to a specific element in a packed collection.

The view converts element values from their packed representation automatically, using the PackedCollection trait.

Required methods

fn view<T>(&self, index: usize) -> ViewRef<'_, Self, T> where
    T: PackedElement
[src]

Get a ViewRef for at the provided index on this collection.

Loading content...

Provided methods

fn get_unpack<T>(&self, index: usize) -> T where
    T: PackedElement
[src]

Get the element at index and unpack it.

Loading content...

Implementors

impl<V> Viewable for V where
    V: PackedCollection + Sized
[src]

Loading content...