Trait 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 methods
    fn borrow<'a>(&'a self) -> Self::Borrowed<'a>;
    fn reborrow<'b, 'a: 'b>(item: Self::Borrowed<'a>) -> Self::Borrowed<'b>
       where Self: '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.

Source

fn reborrow<'b, 'a: 'b>(item: Self::Borrowed<'a>) -> Self::Borrowed<'b>
where Self: 'a,

Reborrows the borrowed type to a shorter lifetime. See Columnar::reborrow for details.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Container<f32> for Vec<f32>

Source§

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

Source§

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

Source§

fn reborrow<'b, 'a: 'b>(thing: &'a [f32]) -> Self::Borrowed<'b>
where Self: 'a,

Source§

impl Container<f64> for Vec<f64>

Source§

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

Source§

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

Source§

fn reborrow<'b, 'a: 'b>(thing: &'a [f64]) -> Self::Borrowed<'b>
where Self: 'a,

Source§

impl Container<i8> for Vec<i8>

Source§

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

Source§

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

Source§

fn reborrow<'b, 'a: 'b>(thing: &'a [i8]) -> Self::Borrowed<'b>
where Self: 'a,

Source§

impl Container<i16> for Vec<i16>

Source§

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

Source§

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

Source§

fn reborrow<'b, 'a: 'b>(thing: &'a [i16]) -> Self::Borrowed<'b>
where Self: 'a,

Source§

impl Container<i32> for Vec<i32>

Source§

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

Source§

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

Source§

fn reborrow<'b, 'a: 'b>(thing: &'a [i32]) -> Self::Borrowed<'b>
where Self: 'a,

Source§

impl Container<i64> for Vec<i64>

Source§

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

Source§

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

Source§

fn reborrow<'b, 'a: 'b>(thing: &'a [i64]) -> Self::Borrowed<'b>
where Self: 'a,

Source§

impl Container<i128> for Vec<i128>

Source§

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

Source§

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

Source§

fn reborrow<'b, 'a: 'b>(thing: &'a [i128]) -> Self::Borrowed<'b>
where Self: 'a,

Source§

impl Container<u8> for Vec<u8>

Source§

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

Source§

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

Source§

fn reborrow<'b, 'a: 'b>(thing: &'a [u8]) -> Self::Borrowed<'b>
where Self: 'a,

Source§

impl Container<u16> for Vec<u16>

Source§

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

Source§

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

Source§

fn reborrow<'b, 'a: 'b>(thing: &'a [u16]) -> Self::Borrowed<'b>
where Self: 'a,

Source§

impl Container<u32> for Vec<u32>

Source§

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

Source§

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

Source§

fn reborrow<'b, 'a: 'b>(thing: &'a [u32]) -> Self::Borrowed<'b>
where Self: 'a,

Source§

impl Container<u64> for Vec<u64>

Source§

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

Source§

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

Source§

fn reborrow<'b, 'a: 'b>(thing: &'a [u64]) -> Self::Borrowed<'b>
where Self: 'a,

Source§

impl Container<u128> for Vec<u128>

Source§

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

Source§

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

Source§

fn reborrow<'b, 'a: 'b>(thing: &'a [u128]) -> Self::Borrowed<'b>
where Self: 'a,

Source§

impl Container<Wrapping<i8>> for Vec<Wrapping<i8>>

Source§

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

Source§

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

Source§

fn reborrow<'b, 'a: 'b>(thing: &'a [Wrapping<i8>]) -> Self::Borrowed<'b>
where Self: 'a,

Source§

impl Container<Wrapping<i16>> for Vec<Wrapping<i16>>

Source§

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

Source§

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

Source§

fn reborrow<'b, 'a: 'b>(thing: &'a [Wrapping<i16>]) -> Self::Borrowed<'b>
where Self: 'a,

Source§

impl Container<Wrapping<i32>> for Vec<Wrapping<i32>>

Source§

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

Source§

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

Source§

fn reborrow<'b, 'a: 'b>(thing: &'a [Wrapping<i32>]) -> Self::Borrowed<'b>
where Self: 'a,

Source§

impl Container<Wrapping<i64>> for Vec<Wrapping<i64>>

Source§

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

Source§

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

Source§

fn reborrow<'b, 'a: 'b>(thing: &'a [Wrapping<i64>]) -> Self::Borrowed<'b>
where Self: 'a,

Source§

impl Container<Wrapping<i128>> for Vec<Wrapping<i128>>

Source§

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

Source§

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

Source§

fn reborrow<'b, 'a: 'b>(thing: &'a [Wrapping<i128>]) -> Self::Borrowed<'b>
where Self: 'a,

Source§

impl Container<Wrapping<u8>> for Vec<Wrapping<u8>>

Source§

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

Source§

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

Source§

fn reborrow<'b, 'a: 'b>(thing: &'a [Wrapping<u8>]) -> Self::Borrowed<'b>
where Self: 'a,

Source§

impl Container<Wrapping<u16>> for Vec<Wrapping<u16>>

Source§

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

Source§

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

Source§

fn reborrow<'b, 'a: 'b>(thing: &'a [Wrapping<u16>]) -> Self::Borrowed<'b>
where Self: 'a,

Source§

impl Container<Wrapping<u32>> for Vec<Wrapping<u32>>

Source§

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

Source§

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

Source§

fn reborrow<'b, 'a: 'b>(thing: &'a [Wrapping<u32>]) -> Self::Borrowed<'b>
where Self: 'a,

Source§

impl Container<Wrapping<u64>> for Vec<Wrapping<u64>>

Source§

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

Source§

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

Source§

fn reborrow<'b, 'a: 'b>(thing: &'a [Wrapping<u64>]) -> Self::Borrowed<'b>
where Self: 'a,

Source§

impl Container<Wrapping<u128>> for Vec<Wrapping<u128>>

Source§

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

Source§

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

Source§

fn reborrow<'b, 'a: 'b>(thing: &'a [Wrapping<u128>]) -> Self::Borrowed<'b>
where Self: 'a,

Source§

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

Source§

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

Source§

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

Source§

fn reborrow<'b, 'a: 'b>(thing: Self::Borrowed<'a>) -> Self::Borrowed<'b>
where AA: 'a,

Source§

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

Source§

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§

fn reborrow<'b, 'a: 'b>(thing: Self::Borrowed<'a>) -> Self::Borrowed<'b>
where AA: 'a, BB: '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)

Source§

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§

fn reborrow<'b, 'a: 'b>(thing: Self::Borrowed<'a>) -> Self::Borrowed<'b>
where AA: 'a, BB: 'a, CC: '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)

Source§

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§

fn reborrow<'b, 'a: 'b>(thing: Self::Borrowed<'a>) -> Self::Borrowed<'b>
where AA: 'a, BB: 'a, CC: 'a, DD: '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)

Source§

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§

fn reborrow<'b, 'a: 'b>(thing: Self::Borrowed<'a>) -> Self::Borrowed<'b>
where AA: 'a, BB: 'a, CC: 'a, DD: 'a, EE: '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)

Source§

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§

fn reborrow<'b, 'a: 'b>(thing: Self::Borrowed<'a>) -> Self::Borrowed<'b>
where AA: 'a, BB: 'a, CC: 'a, DD: 'a, EE: 'a, FF: '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)

Source§

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§

fn reborrow<'b, 'a: 'b>(thing: Self::Borrowed<'a>) -> Self::Borrowed<'b>
where AA: 'a, BB: 'a, CC: 'a, DD: 'a, EE: 'a, FF: 'a, GG: '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)

Source§

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§

fn reborrow<'b, 'a: 'b>(thing: Self::Borrowed<'a>) -> Self::Borrowed<'b>
where AA: 'a, BB: 'a, CC: 'a, DD: 'a, EE: 'a, FF: 'a, GG: 'a, HH: '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)

Source§

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§

fn reborrow<'b, 'a: 'b>(thing: Self::Borrowed<'a>) -> Self::Borrowed<'b>
where AA: 'a, BB: 'a, CC: 'a, DD: 'a, EE: 'a, FF: 'a, GG: 'a, HH: 'a, II: '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)

Source§

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>

Source§

fn reborrow<'b, 'a: 'b>(thing: Self::Borrowed<'a>) -> Self::Borrowed<'b>
where AA: 'a, BB: 'a, CC: 'a, DD: 'a, EE: 'a, FF: 'a, GG: 'a, HH: 'a, II: 'a, JJ: 'a,

Implementors§

Source§

impl Container<()> for Empties

Source§

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

Source§

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

Source§

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>>

Source§

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>

Source§

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

Source§

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

Source§

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>

Source§

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>

Source§

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<Container = TC>, BC: Container<u64>, TC: Container<T>> Container<Vec<T>> for Vecs<TC, BC>

Source§

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<T: Columnar<Container = TC>, BC: Container<u64>, TC: Container<T>, const N: usize> Container<[T; N]> for Vecs<TC, BC>

Source§

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<T: Columnar<Container = TC>, BC: Container<u64>, TC: Container<T>, const N: usize> Container<SmallVec<[T; N]>> for Vecs<TC, BC>

Source§

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<T: Columnar, TC: Container<T>> Container<Option<T>> for Options<TC>

Source§

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

Source§

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

Source§

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