Trait columnar::Container

source ·
pub trait Container<C: Columnar + ?Sized> {
    type Borrowed<'a>: Copy + Len + AsBytes<'a> + FromBytes<'a> + Index<Ref = C::Ref<'a>>
       where Self: 'a;

    // Required method
    fn borrow<'a>(&'a self) -> Self::Borrowed<'a>;
}
Expand description

A container that can hold C, and provide its preferred references.

As an example, (Vec<A>, Vecs<Vec<B>>).

Required Associated Types§

source

type Borrowed<'a>: Copy + Len + AsBytes<'a> + FromBytes<'a> + Index<Ref = C::Ref<'a>> where Self: 'a

The type of a borrowed container.

Corresponding to our example, (&'a [A], Vecs<&'a [B], &'a [u64]>).

Required Methods§

source

fn borrow<'a>(&'a self) -> Self::Borrowed<'a>

Converts a reference to the type to a borrowed variant.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Container<f32> for Vec<f32>

§

type Borrowed<'a> = &'a [f32]

source§

fn borrow<'a>(&'a self) -> Self::Borrowed<'a>

source§

impl Container<f64> for Vec<f64>

§

type Borrowed<'a> = &'a [f64]

source§

fn borrow<'a>(&'a self) -> Self::Borrowed<'a>

source§

impl Container<i8> for Vec<i8>

§

type Borrowed<'a> = &'a [i8]

source§

fn borrow<'a>(&'a self) -> Self::Borrowed<'a>

source§

impl Container<i16> for Vec<i16>

§

type Borrowed<'a> = &'a [i16]

source§

fn borrow<'a>(&'a self) -> Self::Borrowed<'a>

source§

impl Container<i32> for Vec<i32>

§

type Borrowed<'a> = &'a [i32]

source§

fn borrow<'a>(&'a self) -> Self::Borrowed<'a>

source§

impl Container<i64> for Vec<i64>

§

type Borrowed<'a> = &'a [i64]

source§

fn borrow<'a>(&'a self) -> Self::Borrowed<'a>

source§

impl Container<i128> for Vec<i128>

§

type Borrowed<'a> = &'a [i128]

source§

fn borrow<'a>(&'a self) -> Self::Borrowed<'a>

source§

impl Container<u8> for Vec<u8>

§

type Borrowed<'a> = &'a [u8]

source§

fn borrow<'a>(&'a self) -> Self::Borrowed<'a>

source§

impl Container<u16> for Vec<u16>

§

type Borrowed<'a> = &'a [u16]

source§

fn borrow<'a>(&'a self) -> Self::Borrowed<'a>

source§

impl Container<u32> for Vec<u32>

§

type Borrowed<'a> = &'a [u32]

source§

fn borrow<'a>(&'a self) -> Self::Borrowed<'a>

source§

impl Container<u64> for Vec<u64>

§

type Borrowed<'a> = &'a [u64]

source§

fn borrow<'a>(&'a self) -> Self::Borrowed<'a>

source§

impl Container<u128> for Vec<u128>

§

type Borrowed<'a> = &'a [u128]

source§

fn borrow<'a>(&'a self) -> Self::Borrowed<'a>

source§

impl<A: Columnar, AA: Container<A>> Container<(A,)> for (AA,)

§

type Borrowed<'a> = (<AA as Container<A>>::Borrowed<'a>,) where A: 'a, AA: 'a

source§

fn borrow<'a>(&'a self) -> Self::Borrowed<'a>

source§

impl<A: Columnar, AA: Container<A>, B: Columnar, BB: Container<B>> Container<(A, B)> for (AA, BB)

§

type Borrowed<'a> = (<AA as Container<A>>::Borrowed<'a>, <BB as Container<B>>::Borrowed<'a>) where A: 'a, AA: 'a, B: 'a, BB: 'a

source§

fn borrow<'a>(&'a self) -> Self::Borrowed<'a>

source§

impl<A: Columnar, AA: Container<A>, B: Columnar, BB: Container<B>, C: Columnar, CC: Container<C>> Container<(A, B, C)> for (AA, BB, CC)

§

type Borrowed<'a> = (<AA as Container<A>>::Borrowed<'a>, <BB as Container<B>>::Borrowed<'a>, <CC as Container<C>>::Borrowed<'a>) where A: 'a, AA: 'a, B: 'a, BB: 'a, C: 'a, CC: 'a

source§

fn borrow<'a>(&'a self) -> Self::Borrowed<'a>

source§

impl<A: Columnar, AA: Container<A>, B: Columnar, BB: Container<B>, C: Columnar, CC: Container<C>, D: Columnar, DD: Container<D>> Container<(A, B, C, D)> for (AA, BB, CC, DD)

§

type Borrowed<'a> = (<AA as Container<A>>::Borrowed<'a>, <BB as Container<B>>::Borrowed<'a>, <CC as Container<C>>::Borrowed<'a>, <DD as Container<D>>::Borrowed<'a>) where A: 'a, AA: 'a, B: 'a, BB: 'a, C: 'a, CC: 'a, D: 'a, DD: 'a

source§

fn borrow<'a>(&'a self) -> Self::Borrowed<'a>

source§

impl<A: Columnar, AA: Container<A>, B: Columnar, BB: Container<B>, C: Columnar, CC: Container<C>, D: Columnar, DD: Container<D>, E: Columnar, EE: Container<E>> Container<(A, B, C, D, E)> for (AA, BB, CC, DD, EE)

§

type Borrowed<'a> = (<AA as Container<A>>::Borrowed<'a>, <BB as Container<B>>::Borrowed<'a>, <CC as Container<C>>::Borrowed<'a>, <DD as Container<D>>::Borrowed<'a>, <EE as Container<E>>::Borrowed<'a>) where A: 'a, AA: 'a, B: 'a, BB: 'a, C: 'a, CC: 'a, D: 'a, DD: 'a, E: 'a, EE: 'a

source§

fn borrow<'a>(&'a self) -> Self::Borrowed<'a>

source§

impl<A: Columnar, AA: Container<A>, B: Columnar, BB: Container<B>, C: Columnar, CC: Container<C>, D: Columnar, DD: Container<D>, E: Columnar, EE: Container<E>, F: Columnar, FF: Container<F>> Container<(A, B, C, D, E, F)> for (AA, BB, CC, DD, EE, FF)

§

type Borrowed<'a> = (<AA as Container<A>>::Borrowed<'a>, <BB as Container<B>>::Borrowed<'a>, <CC as Container<C>>::Borrowed<'a>, <DD as Container<D>>::Borrowed<'a>, <EE as Container<E>>::Borrowed<'a>, <FF as Container<F>>::Borrowed<'a>) where A: 'a, AA: 'a, B: 'a, BB: 'a, C: 'a, CC: 'a, D: 'a, DD: 'a, E: 'a, EE: 'a, F: 'a, FF: 'a

source§

fn borrow<'a>(&'a self) -> Self::Borrowed<'a>

source§

impl<A: Columnar, AA: Container<A>, B: Columnar, BB: Container<B>, C: Columnar, CC: Container<C>, D: Columnar, DD: Container<D>, E: Columnar, EE: Container<E>, F: Columnar, FF: Container<F>, G: Columnar, GG: Container<G>> Container<(A, B, C, D, E, F, G)> for (AA, BB, CC, DD, EE, FF, GG)

§

type Borrowed<'a> = (<AA as Container<A>>::Borrowed<'a>, <BB as Container<B>>::Borrowed<'a>, <CC as Container<C>>::Borrowed<'a>, <DD as Container<D>>::Borrowed<'a>, <EE as Container<E>>::Borrowed<'a>, <FF as Container<F>>::Borrowed<'a>, <GG as Container<G>>::Borrowed<'a>) where A: 'a, AA: 'a, B: 'a, BB: 'a, C: 'a, CC: 'a, D: 'a, DD: 'a, E: 'a, EE: 'a, F: 'a, FF: 'a, G: 'a, GG: 'a

source§

fn borrow<'a>(&'a self) -> Self::Borrowed<'a>

source§

impl<A: Columnar, AA: Container<A>, B: Columnar, BB: Container<B>, C: Columnar, CC: Container<C>, D: Columnar, DD: Container<D>, E: Columnar, EE: Container<E>, F: Columnar, FF: Container<F>, G: Columnar, GG: Container<G>, H: Columnar, HH: Container<H>> Container<(A, B, C, D, E, F, G, H)> for (AA, BB, CC, DD, EE, FF, GG, HH)

§

type Borrowed<'a> = (<AA as Container<A>>::Borrowed<'a>, <BB as Container<B>>::Borrowed<'a>, <CC as Container<C>>::Borrowed<'a>, <DD as Container<D>>::Borrowed<'a>, <EE as Container<E>>::Borrowed<'a>, <FF as Container<F>>::Borrowed<'a>, <GG as Container<G>>::Borrowed<'a>, <HH as Container<H>>::Borrowed<'a>) where A: 'a, AA: 'a, B: 'a, BB: 'a, C: 'a, CC: 'a, D: 'a, DD: 'a, E: 'a, EE: 'a, F: 'a, FF: 'a, G: 'a, GG: 'a, H: 'a, HH: 'a

source§

fn borrow<'a>(&'a self) -> Self::Borrowed<'a>

source§

impl<A: Columnar, AA: Container<A>, B: Columnar, BB: Container<B>, C: Columnar, CC: Container<C>, D: Columnar, DD: Container<D>, E: Columnar, EE: Container<E>, F: Columnar, FF: Container<F>, G: Columnar, GG: Container<G>, H: Columnar, HH: Container<H>, I: Columnar, II: Container<I>> Container<(A, B, C, D, E, F, G, H, I)> for (AA, BB, CC, DD, EE, FF, GG, HH, II)

§

type Borrowed<'a> = (<AA as Container<A>>::Borrowed<'a>, <BB as Container<B>>::Borrowed<'a>, <CC as Container<C>>::Borrowed<'a>, <DD as Container<D>>::Borrowed<'a>, <EE as Container<E>>::Borrowed<'a>, <FF as Container<F>>::Borrowed<'a>, <GG as Container<G>>::Borrowed<'a>, <HH as Container<H>>::Borrowed<'a>, <II as Container<I>>::Borrowed<'a>) where A: 'a, AA: 'a, B: 'a, BB: 'a, C: 'a, CC: 'a, D: 'a, DD: 'a, E: 'a, EE: 'a, F: 'a, FF: 'a, G: 'a, GG: 'a, H: 'a, HH: 'a, I: 'a, II: 'a

source§

fn borrow<'a>(&'a self) -> Self::Borrowed<'a>

source§

impl<A: Columnar, AA: Container<A>, B: Columnar, BB: Container<B>, C: Columnar, CC: Container<C>, D: Columnar, DD: Container<D>, E: Columnar, EE: Container<E>, F: Columnar, FF: Container<F>, G: Columnar, GG: Container<G>, H: Columnar, HH: Container<H>, I: Columnar, II: Container<I>, J: Columnar, JJ: Container<J>> Container<(A, B, C, D, E, F, G, H, I, J)> for (AA, BB, CC, DD, EE, FF, GG, HH, II, JJ)

§

type Borrowed<'a> = (<AA as Container<A>>::Borrowed<'a>, <BB as Container<B>>::Borrowed<'a>, <CC as Container<C>>::Borrowed<'a>, <DD as Container<D>>::Borrowed<'a>, <EE as Container<E>>::Borrowed<'a>, <FF as Container<F>>::Borrowed<'a>, <GG as Container<G>>::Borrowed<'a>, <HH as Container<H>>::Borrowed<'a>, <II as Container<I>>::Borrowed<'a>, <JJ as Container<J>>::Borrowed<'a>) where A: 'a, AA: 'a, B: 'a, BB: 'a, C: 'a, CC: 'a, D: 'a, DD: 'a, E: 'a, EE: 'a, F: 'a, FF: 'a, G: 'a, GG: 'a, H: 'a, HH: 'a, I: 'a, II: 'a, J: 'a, JJ: 'a

source§

fn borrow<'a>(&'a self) -> Self::Borrowed<'a>

Implementors§

source§

impl Container<()> for Empties

§

type Borrowed<'a> = Empties<&'a u64>

source§

impl<'b, BC: Container<u64>> Container<String> for Strings<BC, &'b [u8]>

§

type Borrowed<'a> = Strings<<BC as Container<u64>>::Borrowed<'a>, &'a [u8]> where BC: 'a, 'b: 'a

source§

impl<BC: Container<u64>> Container<String> for Strings<BC, Vec<u8>>

§

type Borrowed<'a> = Strings<<BC as Container<u64>>::Borrowed<'a>, &'a [u8]> where BC: 'a

source§

impl<CV: Container<i64>> Container<isize> for Isizes<CV>

§

type Borrowed<'a> = Isizes<<CV as Container<i64>>::Borrowed<'a>> where CV: 'a

source§

impl<CV: Container<u64>> Container<usize> for Usizes<CV>

§

type Borrowed<'a> = Usizes<<CV as Container<u64>>::Borrowed<'a>> where CV: 'a

source§

impl<S: Columnar, T: Columnar, SC: Container<S>, TC: Container<T>> Container<Result<S, T>> for Results<SC, TC>

§

type Borrowed<'a> = Results<<SC as Container<S>>::Borrowed<'a>, <TC as Container<T>>::Borrowed<'a>, &'a [u64], &'a [u64], &'a u64> where SC: 'a, TC: 'a, S: 'a, T: 'a

source§

impl<SC: Container<u64>, NC: Container<u32>> Container<Duration> for Durations<SC, NC>

§

type Borrowed<'a> = Durations<<SC as Container<u64>>::Borrowed<'a>, <NC as Container<u32>>::Borrowed<'a>> where SC: 'a, NC: 'a

source§

impl<T: Columnar + Default, TC: Container<T>> Container<Option<T>> for Options<TC>

§

type Borrowed<'a> = Options<<TC as Container<T>>::Borrowed<'a>, &'a [u64], &'a [u64], &'a u64> where TC: 'a, T: 'a

source§

impl<T: Columnar<Container = TC>, BC: Container<u64>, TC: Container<T>> Container<Vec<T>> for Vecs<TC, BC>

§

type Borrowed<'a> = Vecs<<TC as Container<T>>::Borrowed<'a>, <BC as Container<u64>>::Borrowed<'a>> where BC: 'a, TC: 'a, T: 'a

source§

impl<VC: Container<u64>> Container<bool> for Bools<VC>

§

type Borrowed<'a> = Bools<<VC as Container<u64>>::Borrowed<'a>, &'a u64> where VC: 'a