[][src]Trait serde_single_or_vec::Storage

pub trait Storage<'a, T> {
    type Backing;
    fn single(ty: T) -> Self::Backing;
fn get_first_with_len(b: &Self::Backing) -> Option<(&T, usize)>; }

Specifies the internal Storage Type of the Sequence

Associated Types

type Backing

Type to use as storage type;

Loading content...

Required methods

fn single(ty: T) -> Self::Backing

Creates the Storage for a single value

fn get_first_with_len(b: &Self::Backing) -> Option<(&T, usize)>

Returns the first element of the vector if available and the size of the remaining vector without the first element

Loading content...

Implementations on Foreign Types

impl<T, '_> Storage<'_, T> for Vec<T>[src]

type Backing = Self

impl<'a, T: 'a + Clone> Storage<'a, T> for Cow<'a, [T]>[src]

type Backing = Self

Loading content...

Implementors

Loading content...