[−][src]Trait restor::Fetch
The base "get" trait for acquiring data from storage. This is implemented on six types, each of which have a different output. The output is dependent on the type it is being implemented for.
Note that this trait should be considered "sealed" as it is already implemented for all the types it should be implemented for.
Associated Types
type Output: 'a
The type output for Self
.
type Actual
A type exposed for type checking on the contents of the returned lock.
Required methods
fn get(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>
Gets data from the BlackBox
depending on Self
and Output
.
fn waiting_get(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc> where
<U as Unit<'a>>::Borrowed: Waitable,
<U as Unit<'a>>::MutBorrowed: Waitable,
<U as Unit<'a>>::Borrowed: Waitable,
<U as Unit<'a>>::MutBorrowed: Waitable,
Gets data from the BlackBox
depending on Self
and Output
.
This function waits on availability for the lock.
Implementations on Foreign Types
impl<'a, T: Sized + Any + 'static, U: for<'b> Unit<'b> + ?Sized, '_> Fetch<'a, U> for &'_ T where
<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>,
[src]
<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>,
type Output = <<<U as Unit<'a>>::Borrowed as Map<dyn Any, StorageUnit<T>>>::Output as Map<StorageUnit<T>, T>>::Output
type Actual = T
fn get(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>
[src]
fn waiting_get(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc> where
<U as Unit<'a>>::Borrowed: Waitable,
<U as Unit<'a>>::MutBorrowed: Waitable,
[src]
<U as Unit<'a>>::Borrowed: Waitable,
<U as Unit<'a>>::MutBorrowed: Waitable,
impl<'a, T: Sized + Any + 'static, U: for<'b> Unit<'b> + ?Sized, '_> Fetch<'a, U> for &'_ mut T where
<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>,
[src]
<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>,
type Output = <<<U as Unit<'a>>::MutBorrowed as MapMut<dyn Any, StorageUnit<T>>>::Output as MapMut<StorageUnit<T>, T>>::Output
type Actual = T
fn get(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>
[src]
fn waiting_get(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc> where
<U as Unit<'a>>::Borrowed: Waitable,
<U as Unit<'a>>::MutBorrowed: Waitable,
[src]
<U as Unit<'a>>::Borrowed: Waitable,
<U as Unit<'a>>::MutBorrowed: Waitable,
impl<'a, T: Sized + Any + 'static, U: for<'b> Unit<'b> + ?Sized, '_> Fetch<'a, U> for &'_ [T] where
<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]>,
[src]
<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]>,
type Output = <<<U as Unit<'a>>::Borrowed as Map<dyn Any, StorageUnit<T>>>::Output as Map<StorageUnit<T>, [T]>>::Output
type Actual = T
fn get(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>
[src]
fn waiting_get(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc> where
<U as Unit<'a>>::Borrowed: Waitable,
<U as Unit<'a>>::MutBorrowed: Waitable,
[src]
<U as Unit<'a>>::Borrowed: Waitable,
<U as Unit<'a>>::MutBorrowed: Waitable,
impl<'a, T: Sized + Any + 'static, U: for<'b> Unit<'b> + ?Sized, '_> Fetch<'a, U> for &'_ mut [T] where
<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]>,
[src]
<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]>,
type Output = <<<U as Unit<'a>>::MutBorrowed as MapMut<dyn Any, StorageUnit<T>>>::Output as MapMut<StorageUnit<T>, [T]>>::Output
type Actual = T
fn get(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>
[src]
fn waiting_get(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc> where
<U as Unit<'a>>::Borrowed: Waitable,
<U as Unit<'a>>::MutBorrowed: Waitable,
[src]
<U as Unit<'a>>::Borrowed: Waitable,
<U as Unit<'a>>::MutBorrowed: Waitable,
impl<'a, T: Sized + Any + 'static, U: for<'b> Unit<'b> + ?Sized> Fetch<'a, U> for Box<T> where
<U as Unit<'a>>::MutBorrowed: MapMut<dyn Any, StorageUnit<T>, Func = dyn Fn(&mut dyn Any) -> &mut StorageUnit<T>>,
[src]
<U as Unit<'a>>::MutBorrowed: MapMut<dyn Any, StorageUnit<T>, Func = dyn Fn(&mut dyn Any) -> &mut StorageUnit<T>>,
type Output = T
type Actual = T
fn get(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>
[src]
fn waiting_get(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc> where
<U as Unit<'a>>::Borrowed: Waitable,
<U as Unit<'a>>::MutBorrowed: Waitable,
[src]
<U as Unit<'a>>::Borrowed: Waitable,
<U as Unit<'a>>::MutBorrowed: Waitable,
impl<'a, T: Sized + Any + 'static, U: for<'b> Unit<'b> + ?Sized> Fetch<'a, U> for Vec<T> where
<U as Unit<'a>>::MutBorrowed: MapMut<dyn Any, StorageUnit<T>, Func = dyn Fn(&mut dyn Any) -> &mut StorageUnit<T>>,
[src]
<U as Unit<'a>>::MutBorrowed: MapMut<dyn Any, StorageUnit<T>, Func = dyn Fn(&mut dyn Any) -> &mut StorageUnit<T>>,
type Output = Vec<T>
type Actual = T
fn get(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc>
[src]
fn waiting_get(boxed: &'a BlackBox<U>) -> Result<Self::Output, ErrorDesc> where
<U as Unit<'a>>::Borrowed: Waitable,
<U as Unit<'a>>::MutBorrowed: Waitable,
[src]
<U as Unit<'a>>::Borrowed: Waitable,
<U as Unit<'a>>::MutBorrowed: Waitable,