pub trait StorageInto<Target> {
type Output;
// Required method
fn storage_into(self) -> Self::Output;
}Expand description
Convert the storage type into another using the Into trait.
Required Associated Types§
Required Methods§
fn storage_into(self) -> Self::Output
Implementations on Foreign Types§
Source§impl<'a, T: 'a> StorageInto<&'a [T]> for &'a mut [T]
Convert a mutable slice into an immutable borrow.
impl<'a, T: 'a> StorageInto<&'a [T]> for &'a mut [T]
Convert a mutable slice into an immutable borrow.
Source§impl<'a, T: Clone> StorageInto<Vec<T>> for &'a mut [T]
Convert a mutable slice into an owned Vec type.
impl<'a, T: Clone> StorageInto<Vec<T>> for &'a mut [T]
Convert a mutable slice into an owned Vec type.
Source§impl<T, S: Into<T>> StorageInto<Vec<T>> for Vec<S>
impl<T, S: Into<T>> StorageInto<Vec<T>> for Vec<S>
Source§fn storage_into(self) -> Self::Output
fn storage_into(self) -> Self::Output
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>
Source§impl<U, V, S: StorageInto<U>, T: StorageInto<V>> StorageInto<(U, V)> for (S, T)
impl<U, V, S: StorageInto<U>, T: StorageInto<V>> StorageInto<(U, V)> for (S, T)
type Output = (<S as StorageInto<U>>::Output, <T as StorageInto<V>>::Output)
fn storage_into(self) -> Self::Output
Implementors§
Source§impl<S: StorageInto<T>, I, T> StorageInto<T> for Select<S, I>
Pass through the conversion for structure type Select.
impl<S: StorageInto<T>, I, T> StorageInto<T> for Select<S, I>
Pass through the conversion for structure type Select.
Source§impl<S: StorageInto<T>, I, T> StorageInto<T> for Subset<S, I>
Pass through the conversion for structure type Subset.
impl<S: StorageInto<T>, I, T> StorageInto<T> for Subset<S, I>
Pass through the conversion for structure type Subset.
Source§impl<S: StorageInto<T>, N, T> StorageInto<T> for UniChunked<S, N>
Pass through the conversion for structure type UniChunked.
impl<S: StorageInto<T>, N, T> StorageInto<T> for UniChunked<S, N>
Pass through the conversion for structure type UniChunked.
type Output = UniChunked<<S as StorageInto<T>>::Output, N>
Source§impl<S: StorageInto<T>, O, T> StorageInto<T> for Chunked<S, O>
Pass through the conversion for structure type Chunked.
impl<S: StorageInto<T>, O, T> StorageInto<T> for Chunked<S, O>
Pass through the conversion for structure type Chunked.
Source§impl<S: StorageInto<U>, T, I, U> StorageInto<U> for Sparse<S, T, I>
Pass through the conversion for structure type Subset.
impl<S: StorageInto<U>, T, I, U> StorageInto<U> for Sparse<S, T, I>
Pass through the conversion for structure type Subset.