[−][src]Trait flatk::StorageInto
Transform the access pattern of the underlying storage type. This is useful
when the storage is not just a simple Vec
or slice but a combination of independent
collections.
Associated Types
type Output
Required methods
fn storage_into(self) -> Self::Output
Implementations on Foreign Types
impl<'a, T: Clone> StorageInto<Vec<T>> for &'a [T]
[src]
Convert a slice into an owned Vec
type.
type Output = Vec<T>
fn storage_into(self) -> Self::Output
[src]
impl<'a, T: Clone> StorageInto<Vec<T>> for &'a mut [T]
[src]
Convert a mutable slice into an owned Vec
type.
type Output = Vec<T>
fn storage_into(self) -> Self::Output
[src]
impl<'a, T: 'a> StorageInto<&'a [T]> for &'a mut [T]
[src]
Convert a mutable slice into an immutable borrow.
type Output = &'a [T]
fn storage_into(self) -> Self::Output
[src]
impl<U, V, S: StorageInto<U>, T: StorageInto<V>> StorageInto<(U, V)> for (S, T)
[src]
impl<T, S: Into<T>> StorageInto<Vec<T>> for Vec<S>
[src]
Convert a Vec
of one type into a Vec
of another type given that the element types can be
converted.
Example
use flatk::*; let sentences = vec!["First", "sentence", "about", "nothing", ".", "Second", "sentence", "."]; let chunked = Chunked::from_sizes(vec![5,3], sentences); let owned_sentences: Chunked<Vec<String>> = chunked.storage_into(); assert_eq!(Some(&["Second".to_string(), "sentence".to_string(), ".".to_string()][..]), owned_sentences.view().get(1));
type Output = Vec<T>
fn storage_into(self) -> Self::Output
[src]
Implementors
impl<S: StorageInto<T>, I, T> StorageInto<T> for Select<S, I>
[src]
Pass through the conversion for structure type Select
.
impl<S: StorageInto<T>, I, T> StorageInto<T> for Subset<S, I>
[src]
Pass through the conversion for structure type Subset
.
impl<S: StorageInto<T>, N, T> StorageInto<T> for UniChunked<S, N>
[src]
Pass through the conversion for structure type UniChunked
.
type Output = UniChunked<S::Output, N>
fn storage_into(self) -> Self::Output
[src]
impl<S: StorageInto<T>, O, T> StorageInto<T> for Chunked<S, O>
[src]
Pass through the conversion for structure type Chunked
.
impl<S: StorageInto<U>, T, I, U> StorageInto<U> for Sparse<S, T, I>
[src]
Pass through the conversion for structure type Subset
.