Skip to main content

FetchMultiple

Trait FetchMultiple 

Source
pub trait FetchMultiple<'a, U: ?Sized + Unit<'a>> {
    type Output: 'a;
    type Actual;

    // Required methods
    fn get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>;
    fn waiting_get_many(
        boxed: &'a BlackBox<U>,
    ) -> Result<Self::Output, ErrorDesc>
       where <U as Unit<'a>>::Borrowed: Waitable,
             <U as Unit<'a>>::MutBorrowed: Waitable;
}
Expand description

An abstraction over Fetch which works over multiple types, and the six types which have Fetch pre-implemented. This is therefore implemented for the following types:

  • &T
  • &mut T
  • &[T]
  • &mut [T]
  • Box<T>
  • Vec<T>
  • (A,)
  • (A, B)
  • (A, B, C)
  • (A, B, C, D)
  • (A, B, C, D, E, F, G, H, I, J, K)

Where each one of the type parameters in the tuple versions must implement Fetch.

Required Associated Types§

Required Methods§

Source

fn get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>

Source

fn waiting_get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>
where <U as Unit<'a>>::Borrowed: Waitable, <U as Unit<'a>>::MutBorrowed: Waitable,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, U, A, B, C, D, E, F, G, H, I, J, K> FetchMultiple<'a, U> for (A, B, C, D, E, F, G, H, I, J, K)
where B: Fetch<'a, U>, C: Fetch<'a, U>, D: Fetch<'a, U>, E: Fetch<'a, U>, F: Fetch<'a, U>, G: Fetch<'a, U>, H: Fetch<'a, U>, I: Fetch<'a, U>, J: Fetch<'a, U>, K: Fetch<'a, U>, A: Fetch<'a, U>, U: Unit<'a> + ?Sized,

Source§

type Output = (<A as Fetch<'a, U>>::Output, <B as Fetch<'a, U>>::Output, <C as Fetch<'a, U>>::Output, <D as Fetch<'a, U>>::Output, <E as Fetch<'a, U>>::Output, <F as Fetch<'a, U>>::Output, <G as Fetch<'a, U>>::Output, <H as Fetch<'a, U>>::Output, <I as Fetch<'a, U>>::Output, <J as Fetch<'a, U>>::Output, <K as Fetch<'a, U>>::Output)

Source§

type Actual = (<A as Fetch<'a, U>>::Actual, <B as Fetch<'a, U>>::Actual, <C as Fetch<'a, U>>::Actual, <D as Fetch<'a, U>>::Actual, <E as Fetch<'a, U>>::Actual, <F as Fetch<'a, U>>::Actual, <G as Fetch<'a, U>>::Actual, <H as Fetch<'a, U>>::Actual, <I as Fetch<'a, U>>::Actual, <J as Fetch<'a, U>>::Actual, <K as Fetch<'a, U>>::Actual)

Source§

fn get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>

Source§

fn waiting_get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>
where <U as Unit<'a>>::Borrowed: Waitable, <U as Unit<'a>>::MutBorrowed: Waitable,

Source§

impl<'a, U, B, C, D, E, F, G, H, I, J, K> FetchMultiple<'a, U> for (B, C, D, E, F, G, H, I, J, K)
where C: Fetch<'a, U>, D: Fetch<'a, U>, E: Fetch<'a, U>, F: Fetch<'a, U>, G: Fetch<'a, U>, H: Fetch<'a, U>, I: Fetch<'a, U>, J: Fetch<'a, U>, K: Fetch<'a, U>, B: Fetch<'a, U>, U: Unit<'a> + ?Sized,

Source§

type Output = (<B as Fetch<'a, U>>::Output, <C as Fetch<'a, U>>::Output, <D as Fetch<'a, U>>::Output, <E as Fetch<'a, U>>::Output, <F as Fetch<'a, U>>::Output, <G as Fetch<'a, U>>::Output, <H as Fetch<'a, U>>::Output, <I as Fetch<'a, U>>::Output, <J as Fetch<'a, U>>::Output, <K as Fetch<'a, U>>::Output)

Source§

type Actual = (<B as Fetch<'a, U>>::Actual, <C as Fetch<'a, U>>::Actual, <D as Fetch<'a, U>>::Actual, <E as Fetch<'a, U>>::Actual, <F as Fetch<'a, U>>::Actual, <G as Fetch<'a, U>>::Actual, <H as Fetch<'a, U>>::Actual, <I as Fetch<'a, U>>::Actual, <J as Fetch<'a, U>>::Actual, <K as Fetch<'a, U>>::Actual)

Source§

fn get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>

Source§

fn waiting_get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>
where <U as Unit<'a>>::Borrowed: Waitable, <U as Unit<'a>>::MutBorrowed: Waitable,

Source§

impl<'a, U, C, D, E, F, G, H, I, J, K> FetchMultiple<'a, U> for (C, D, E, F, G, H, I, J, K)
where D: Fetch<'a, U>, E: Fetch<'a, U>, F: Fetch<'a, U>, G: Fetch<'a, U>, H: Fetch<'a, U>, I: Fetch<'a, U>, J: Fetch<'a, U>, K: Fetch<'a, U>, C: Fetch<'a, U>, U: Unit<'a> + ?Sized,

Source§

type Output = (<C as Fetch<'a, U>>::Output, <D as Fetch<'a, U>>::Output, <E as Fetch<'a, U>>::Output, <F as Fetch<'a, U>>::Output, <G as Fetch<'a, U>>::Output, <H as Fetch<'a, U>>::Output, <I as Fetch<'a, U>>::Output, <J as Fetch<'a, U>>::Output, <K as Fetch<'a, U>>::Output)

Source§

type Actual = (<C as Fetch<'a, U>>::Actual, <D as Fetch<'a, U>>::Actual, <E as Fetch<'a, U>>::Actual, <F as Fetch<'a, U>>::Actual, <G as Fetch<'a, U>>::Actual, <H as Fetch<'a, U>>::Actual, <I as Fetch<'a, U>>::Actual, <J as Fetch<'a, U>>::Actual, <K as Fetch<'a, U>>::Actual)

Source§

fn get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>

Source§

fn waiting_get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>
where <U as Unit<'a>>::Borrowed: Waitable, <U as Unit<'a>>::MutBorrowed: Waitable,

Source§

impl<'a, U, D, E, F, G, H, I, J, K> FetchMultiple<'a, U> for (D, E, F, G, H, I, J, K)
where E: Fetch<'a, U>, F: Fetch<'a, U>, G: Fetch<'a, U>, H: Fetch<'a, U>, I: Fetch<'a, U>, J: Fetch<'a, U>, K: Fetch<'a, U>, D: Fetch<'a, U>, U: Unit<'a> + ?Sized,

Source§

type Output = (<D as Fetch<'a, U>>::Output, <E as Fetch<'a, U>>::Output, <F as Fetch<'a, U>>::Output, <G as Fetch<'a, U>>::Output, <H as Fetch<'a, U>>::Output, <I as Fetch<'a, U>>::Output, <J as Fetch<'a, U>>::Output, <K as Fetch<'a, U>>::Output)

Source§

type Actual = (<D as Fetch<'a, U>>::Actual, <E as Fetch<'a, U>>::Actual, <F as Fetch<'a, U>>::Actual, <G as Fetch<'a, U>>::Actual, <H as Fetch<'a, U>>::Actual, <I as Fetch<'a, U>>::Actual, <J as Fetch<'a, U>>::Actual, <K as Fetch<'a, U>>::Actual)

Source§

fn get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>

Source§

fn waiting_get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>
where <U as Unit<'a>>::Borrowed: Waitable, <U as Unit<'a>>::MutBorrowed: Waitable,

Source§

impl<'a, U, E, F, G, H, I, J, K> FetchMultiple<'a, U> for (E, F, G, H, I, J, K)
where F: Fetch<'a, U>, G: Fetch<'a, U>, H: Fetch<'a, U>, I: Fetch<'a, U>, J: Fetch<'a, U>, K: Fetch<'a, U>, E: Fetch<'a, U>, U: Unit<'a> + ?Sized,

Source§

type Output = (<E as Fetch<'a, U>>::Output, <F as Fetch<'a, U>>::Output, <G as Fetch<'a, U>>::Output, <H as Fetch<'a, U>>::Output, <I as Fetch<'a, U>>::Output, <J as Fetch<'a, U>>::Output, <K as Fetch<'a, U>>::Output)

Source§

type Actual = (<E as Fetch<'a, U>>::Actual, <F as Fetch<'a, U>>::Actual, <G as Fetch<'a, U>>::Actual, <H as Fetch<'a, U>>::Actual, <I as Fetch<'a, U>>::Actual, <J as Fetch<'a, U>>::Actual, <K as Fetch<'a, U>>::Actual)

Source§

fn get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>

Source§

fn waiting_get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>
where <U as Unit<'a>>::Borrowed: Waitable, <U as Unit<'a>>::MutBorrowed: Waitable,

Source§

impl<'a, U, F, G, H, I, J, K> FetchMultiple<'a, U> for (F, G, H, I, J, K)
where G: Fetch<'a, U>, H: Fetch<'a, U>, I: Fetch<'a, U>, J: Fetch<'a, U>, K: Fetch<'a, U>, F: Fetch<'a, U>, U: Unit<'a> + ?Sized,

Source§

type Output = (<F as Fetch<'a, U>>::Output, <G as Fetch<'a, U>>::Output, <H as Fetch<'a, U>>::Output, <I as Fetch<'a, U>>::Output, <J as Fetch<'a, U>>::Output, <K as Fetch<'a, U>>::Output)

Source§

type Actual = (<F as Fetch<'a, U>>::Actual, <G as Fetch<'a, U>>::Actual, <H as Fetch<'a, U>>::Actual, <I as Fetch<'a, U>>::Actual, <J as Fetch<'a, U>>::Actual, <K as Fetch<'a, U>>::Actual)

Source§

fn get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>

Source§

fn waiting_get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>
where <U as Unit<'a>>::Borrowed: Waitable, <U as Unit<'a>>::MutBorrowed: Waitable,

Source§

impl<'a, U, G, H, I, J, K> FetchMultiple<'a, U> for (G, H, I, J, K)
where H: Fetch<'a, U>, I: Fetch<'a, U>, J: Fetch<'a, U>, K: Fetch<'a, U>, G: Fetch<'a, U>, U: Unit<'a> + ?Sized,

Source§

type Output = (<G as Fetch<'a, U>>::Output, <H as Fetch<'a, U>>::Output, <I as Fetch<'a, U>>::Output, <J as Fetch<'a, U>>::Output, <K as Fetch<'a, U>>::Output)

Source§

type Actual = (<G as Fetch<'a, U>>::Actual, <H as Fetch<'a, U>>::Actual, <I as Fetch<'a, U>>::Actual, <J as Fetch<'a, U>>::Actual, <K as Fetch<'a, U>>::Actual)

Source§

fn get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>

Source§

fn waiting_get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>
where <U as Unit<'a>>::Borrowed: Waitable, <U as Unit<'a>>::MutBorrowed: Waitable,

Source§

impl<'a, U, H, I, J, K> FetchMultiple<'a, U> for (H, I, J, K)
where I: Fetch<'a, U>, J: Fetch<'a, U>, K: Fetch<'a, U>, H: Fetch<'a, U>, U: Unit<'a> + ?Sized,

Source§

type Output = (<H as Fetch<'a, U>>::Output, <I as Fetch<'a, U>>::Output, <J as Fetch<'a, U>>::Output, <K as Fetch<'a, U>>::Output)

Source§

type Actual = (<H as Fetch<'a, U>>::Actual, <I as Fetch<'a, U>>::Actual, <J as Fetch<'a, U>>::Actual, <K as Fetch<'a, U>>::Actual)

Source§

fn get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>

Source§

fn waiting_get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>
where <U as Unit<'a>>::Borrowed: Waitable, <U as Unit<'a>>::MutBorrowed: Waitable,

Source§

impl<'a, U, I, J, K> FetchMultiple<'a, U> for (I, J, K)
where J: Fetch<'a, U>, K: Fetch<'a, U>, I: Fetch<'a, U>, U: Unit<'a> + ?Sized,

Source§

type Output = (<I as Fetch<'a, U>>::Output, <J as Fetch<'a, U>>::Output, <K as Fetch<'a, U>>::Output)

Source§

type Actual = (<I as Fetch<'a, U>>::Actual, <J as Fetch<'a, U>>::Actual, <K as Fetch<'a, U>>::Actual)

Source§

fn get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>

Source§

fn waiting_get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>
where <U as Unit<'a>>::Borrowed: Waitable, <U as Unit<'a>>::MutBorrowed: Waitable,

Source§

impl<'a, U, J, K> FetchMultiple<'a, U> for (J, K)
where K: Fetch<'a, U>, J: Fetch<'a, U>, U: Unit<'a> + ?Sized,

Source§

type Output = (<J as Fetch<'a, U>>::Output, <K as Fetch<'a, U>>::Output)

Source§

type Actual = (<J as Fetch<'a, U>>::Actual, <K as Fetch<'a, U>>::Actual)

Source§

fn get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>

Source§

fn waiting_get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>
where <U as Unit<'a>>::Borrowed: Waitable, <U as Unit<'a>>::MutBorrowed: Waitable,

Source§

impl<'a, U, K> FetchMultiple<'a, U> for (K,)
where K: Fetch<'a, U>, U: Unit<'a> + ?Sized,

Source§

type Output = (<K as Fetch<'a, U>>::Output,)

Source§

type Actual = (<K as Fetch<'a, U>>::Actual,)

Source§

fn get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>

Source§

fn waiting_get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>
where <U as Unit<'a>>::Borrowed: Waitable, <U as Unit<'a>>::MutBorrowed: Waitable,

Source§

impl<'a, U, T: Sized + Any + 'static> FetchMultiple<'a, U> for &'a T
where U: for<'b> Unit<'b> + ?Sized, <U as Unit<'a>>::Borrowed: Map<dyn Any, StorageUnit<T>, Func = dyn Fn(&dyn Any) -> &StorageUnit<T>>, <<U as Unit<'a>>::Borrowed as Map<dyn Any, StorageUnit<T>>>::Output: Map<StorageUnit<T>, T, Func = dyn Fn(&StorageUnit<T>) -> &T>, &'a T: Fetch<'a, U>,

Source§

type Output = <&'a T as Fetch<'a, U>>::Output

Source§

type Actual = <&'a T as Fetch<'a, U>>::Actual

Source§

fn get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>

Source§

fn waiting_get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>
where <U as Unit<'a>>::Borrowed: Waitable, <U as Unit<'a>>::MutBorrowed: Waitable,

Source§

impl<'a, U, T: Sized + Any + 'static> FetchMultiple<'a, U> for &'a [T]
where U: for<'b> Unit<'b> + ?Sized, <U as Unit<'a>>::Borrowed: Map<dyn Any, StorageUnit<T>, Func = dyn Fn(&dyn Any) -> &StorageUnit<T>>, <<U as Unit<'a>>::Borrowed as Map<dyn Any, StorageUnit<T>>>::Output: Map<StorageUnit<T>, [T], Func = dyn Fn(&StorageUnit<T>) -> &[T]>, &'a [T]: Fetch<'a, U>,

Source§

type Output = <&'a [T] as Fetch<'a, U>>::Output

Source§

type Actual = <&'a [T] as Fetch<'a, U>>::Actual

Source§

fn get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>

Source§

fn waiting_get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>
where <U as Unit<'a>>::Borrowed: Waitable, <U as Unit<'a>>::MutBorrowed: Waitable,

Source§

impl<'a, U, T: Sized + Any + 'static> FetchMultiple<'a, U> for &'a mut T
where U: for<'b> Unit<'b> + ?Sized, <U as Unit<'a>>::MutBorrowed: MapMut<dyn Any, StorageUnit<T>, Func = dyn Fn(&mut dyn Any) -> &mut StorageUnit<T>>, <<U as Unit<'a>>::MutBorrowed as MapMut<dyn Any, StorageUnit<T>>>::Output: MapMut<StorageUnit<T>, T, Func = dyn Fn(&mut StorageUnit<T>) -> &mut T>, &'a mut T: Fetch<'a, U>,

Source§

type Output = <&'a mut T as Fetch<'a, U>>::Output

Source§

type Actual = <&'a mut T as Fetch<'a, U>>::Actual

Source§

fn get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>

Source§

fn waiting_get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>
where <U as Unit<'a>>::Borrowed: Waitable, <U as Unit<'a>>::MutBorrowed: Waitable,

Source§

impl<'a, U, T: Sized + Any + 'static> FetchMultiple<'a, U> for &'a mut [T]
where U: for<'b> Unit<'b> + ?Sized, <U as Unit<'a>>::MutBorrowed: MapMut<dyn Any, StorageUnit<T>, Func = dyn Fn(&mut dyn Any) -> &mut StorageUnit<T>>, <<U as Unit<'a>>::MutBorrowed as MapMut<dyn Any, StorageUnit<T>>>::Output: MapMut<StorageUnit<T>, [T], Func = dyn Fn(&mut StorageUnit<T>) -> &mut [T]>, &'a mut [T]: Fetch<'a, U>,

Source§

type Output = <&'a mut [T] as Fetch<'a, U>>::Output

Source§

type Actual = <&'a mut [T] as Fetch<'a, U>>::Actual

Source§

fn get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>

Source§

fn waiting_get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>
where <U as Unit<'a>>::Borrowed: Waitable, <U as Unit<'a>>::MutBorrowed: Waitable,

Source§

impl<'a, U, T: Sized + Any + 'static> FetchMultiple<'a, U> for Box<T>
where U: for<'b> Unit<'b> + ?Sized, <U as Unit<'a>>::MutBorrowed: MapMut<dyn Any, StorageUnit<T>, Func = dyn Fn(&mut dyn Any) -> &mut StorageUnit<T>>, Box<T>: Fetch<'a, U>,

Source§

type Output = <Box<T> as Fetch<'a, U>>::Output

Source§

type Actual = <Box<T> as Fetch<'a, U>>::Actual

Source§

fn get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>

Source§

fn waiting_get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>
where <U as Unit<'a>>::Borrowed: Waitable, <U as Unit<'a>>::MutBorrowed: Waitable,

Source§

impl<'a, U, T: Sized + Any + 'static> FetchMultiple<'a, U> for Vec<T>
where U: for<'b> Unit<'b> + ?Sized, <U as Unit<'a>>::MutBorrowed: MapMut<dyn Any, StorageUnit<T>, Func = dyn Fn(&mut dyn Any) -> &mut StorageUnit<T>>, Vec<T>: Fetch<'a, U>,

Source§

type Output = <Vec<T> as Fetch<'a, U>>::Output

Source§

type Actual = <Vec<T> as Fetch<'a, U>>::Actual

Source§

fn get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>

Source§

fn waiting_get_many(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>
where <U as Unit<'a>>::Borrowed: Waitable, <U as Unit<'a>>::MutBorrowed: Waitable,

Implementors§