pub struct Asyncify<F>(pub F);Expand description
Turns a synchronous function into a type that implements Injectable.
Tuple Fields§
§0: FTrait Implementations§
Source§impl<Func, Output> Injectable<Output, ()> for Asyncify<Func>
impl<Func, Output> Injectable<Output, ()> for Asyncify<Func>
fn inject<'a>(&'a self, container: &'a DependencyMap) -> CompiledFn<'a, Output>
Source§fn input_types() -> BTreeSet<Type>
fn input_types() -> BTreeSet<Type>
Returns the set of types that this function depends on. Used only for
run-time “type checking”.
Source§impl<Func, Output, T1> Injectable<Output, (T1,)> for Asyncify<Func>
impl<Func, Output, T1> Injectable<Output, (T1,)> for Asyncify<Func>
fn inject<'a>(&'a self, container: &'a DependencyMap) -> CompiledFn<'a, Output>
Source§fn input_types() -> BTreeSet<Type>
fn input_types() -> BTreeSet<Type>
Returns the set of types that this function depends on. Used only for
run-time “type checking”.
Source§impl<Func, Output, T1, T2> Injectable<Output, (T1, T2)> for Asyncify<Func>
impl<Func, Output, T1, T2> Injectable<Output, (T1, T2)> for Asyncify<Func>
fn inject<'a>(&'a self, container: &'a DependencyMap) -> CompiledFn<'a, Output>
Source§fn input_types() -> BTreeSet<Type>
fn input_types() -> BTreeSet<Type>
Returns the set of types that this function depends on. Used only for
run-time “type checking”.
Source§impl<Func, Output, T1, T2, T3> Injectable<Output, (T1, T2, T3)> for Asyncify<Func>
impl<Func, Output, T1, T2, T3> Injectable<Output, (T1, T2, T3)> for Asyncify<Func>
fn inject<'a>(&'a self, container: &'a DependencyMap) -> CompiledFn<'a, Output>
Source§fn input_types() -> BTreeSet<Type>
fn input_types() -> BTreeSet<Type>
Returns the set of types that this function depends on. Used only for
run-time “type checking”.
Source§impl<Func, Output, T1, T2, T3, T4> Injectable<Output, (T1, T2, T3, T4)> for Asyncify<Func>
impl<Func, Output, T1, T2, T3, T4> Injectable<Output, (T1, T2, T3, T4)> for Asyncify<Func>
fn inject<'a>(&'a self, container: &'a DependencyMap) -> CompiledFn<'a, Output>
Source§fn input_types() -> BTreeSet<Type>
fn input_types() -> BTreeSet<Type>
Returns the set of types that this function depends on. Used only for
run-time “type checking”.
Source§impl<Func, Output, T1, T2, T3, T4, T5> Injectable<Output, (T1, T2, T3, T4, T5)> for Asyncify<Func>
impl<Func, Output, T1, T2, T3, T4, T5> Injectable<Output, (T1, T2, T3, T4, T5)> for Asyncify<Func>
fn inject<'a>(&'a self, container: &'a DependencyMap) -> CompiledFn<'a, Output>
Source§fn input_types() -> BTreeSet<Type>
fn input_types() -> BTreeSet<Type>
Returns the set of types that this function depends on. Used only for
run-time “type checking”.
Source§impl<Func, Output, T1, T2, T3, T4, T5, T6> Injectable<Output, (T1, T2, T3, T4, T5, T6)> for Asyncify<Func>where
Func: Fn(T1, T2, T3, T4, T5, T6) -> Output + Send + Sync + 'static,
Output: Send + 'static,
T1: Clone + Send + Sync + 'static,
T2: Clone + Send + Sync + 'static,
T3: Clone + Send + Sync + 'static,
T4: Clone + Send + Sync + 'static,
T5: Clone + Send + Sync + 'static,
T6: Clone + Send + Sync + 'static,
impl<Func, Output, T1, T2, T3, T4, T5, T6> Injectable<Output, (T1, T2, T3, T4, T5, T6)> for Asyncify<Func>where
Func: Fn(T1, T2, T3, T4, T5, T6) -> Output + Send + Sync + 'static,
Output: Send + 'static,
T1: Clone + Send + Sync + 'static,
T2: Clone + Send + Sync + 'static,
T3: Clone + Send + Sync + 'static,
T4: Clone + Send + Sync + 'static,
T5: Clone + Send + Sync + 'static,
T6: Clone + Send + Sync + 'static,
fn inject<'a>(&'a self, container: &'a DependencyMap) -> CompiledFn<'a, Output>
Source§fn input_types() -> BTreeSet<Type>
fn input_types() -> BTreeSet<Type>
Returns the set of types that this function depends on. Used only for
run-time “type checking”.
Source§impl<Func, Output, T1, T2, T3, T4, T5, T6, T7> Injectable<Output, (T1, T2, T3, T4, T5, T6, T7)> for Asyncify<Func>where
Func: Fn(T1, T2, T3, T4, T5, T6, T7) -> Output + Send + Sync + 'static,
Output: Send + 'static,
T1: Clone + Send + Sync + 'static,
T2: Clone + Send + Sync + 'static,
T3: Clone + Send + Sync + 'static,
T4: Clone + Send + Sync + 'static,
T5: Clone + Send + Sync + 'static,
T6: Clone + Send + Sync + 'static,
T7: Clone + Send + Sync + 'static,
impl<Func, Output, T1, T2, T3, T4, T5, T6, T7> Injectable<Output, (T1, T2, T3, T4, T5, T6, T7)> for Asyncify<Func>where
Func: Fn(T1, T2, T3, T4, T5, T6, T7) -> Output + Send + Sync + 'static,
Output: Send + 'static,
T1: Clone + Send + Sync + 'static,
T2: Clone + Send + Sync + 'static,
T3: Clone + Send + Sync + 'static,
T4: Clone + Send + Sync + 'static,
T5: Clone + Send + Sync + 'static,
T6: Clone + Send + Sync + 'static,
T7: Clone + Send + Sync + 'static,
fn inject<'a>(&'a self, container: &'a DependencyMap) -> CompiledFn<'a, Output>
Source§fn input_types() -> BTreeSet<Type>
fn input_types() -> BTreeSet<Type>
Returns the set of types that this function depends on. Used only for
run-time “type checking”.
Source§impl<Func, Output, T1, T2, T3, T4, T5, T6, T7, T8> Injectable<Output, (T1, T2, T3, T4, T5, T6, T7, T8)> for Asyncify<Func>where
Func: Fn(T1, T2, T3, T4, T5, T6, T7, T8) -> Output + Send + Sync + 'static,
Output: Send + 'static,
T1: Clone + Send + Sync + 'static,
T2: Clone + Send + Sync + 'static,
T3: Clone + Send + Sync + 'static,
T4: Clone + Send + Sync + 'static,
T5: Clone + Send + Sync + 'static,
T6: Clone + Send + Sync + 'static,
T7: Clone + Send + Sync + 'static,
T8: Clone + Send + Sync + 'static,
impl<Func, Output, T1, T2, T3, T4, T5, T6, T7, T8> Injectable<Output, (T1, T2, T3, T4, T5, T6, T7, T8)> for Asyncify<Func>where
Func: Fn(T1, T2, T3, T4, T5, T6, T7, T8) -> Output + Send + Sync + 'static,
Output: Send + 'static,
T1: Clone + Send + Sync + 'static,
T2: Clone + Send + Sync + 'static,
T3: Clone + Send + Sync + 'static,
T4: Clone + Send + Sync + 'static,
T5: Clone + Send + Sync + 'static,
T6: Clone + Send + Sync + 'static,
T7: Clone + Send + Sync + 'static,
T8: Clone + Send + Sync + 'static,
fn inject<'a>(&'a self, container: &'a DependencyMap) -> CompiledFn<'a, Output>
Source§fn input_types() -> BTreeSet<Type>
fn input_types() -> BTreeSet<Type>
Returns the set of types that this function depends on. Used only for
run-time “type checking”.
Source§impl<Func, Output, T1, T2, T3, T4, T5, T6, T7, T8, T9> Injectable<Output, (T1, T2, T3, T4, T5, T6, T7, T8, T9)> for Asyncify<Func>where
Func: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9) -> Output + Send + Sync + 'static,
Output: Send + 'static,
T1: Clone + Send + Sync + 'static,
T2: Clone + Send + Sync + 'static,
T3: Clone + Send + Sync + 'static,
T4: Clone + Send + Sync + 'static,
T5: Clone + Send + Sync + 'static,
T6: Clone + Send + Sync + 'static,
T7: Clone + Send + Sync + 'static,
T8: Clone + Send + Sync + 'static,
T9: Clone + Send + Sync + 'static,
impl<Func, Output, T1, T2, T3, T4, T5, T6, T7, T8, T9> Injectable<Output, (T1, T2, T3, T4, T5, T6, T7, T8, T9)> for Asyncify<Func>where
Func: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9) -> Output + Send + Sync + 'static,
Output: Send + 'static,
T1: Clone + Send + Sync + 'static,
T2: Clone + Send + Sync + 'static,
T3: Clone + Send + Sync + 'static,
T4: Clone + Send + Sync + 'static,
T5: Clone + Send + Sync + 'static,
T6: Clone + Send + Sync + 'static,
T7: Clone + Send + Sync + 'static,
T8: Clone + Send + Sync + 'static,
T9: Clone + Send + Sync + 'static,
fn inject<'a>(&'a self, container: &'a DependencyMap) -> CompiledFn<'a, Output>
Source§fn input_types() -> BTreeSet<Type>
fn input_types() -> BTreeSet<Type>
Returns the set of types that this function depends on. Used only for
run-time “type checking”.
Source§impl<Func, Output, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Injectable<Output, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> for Asyncify<Func>where
Func: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) -> Output + Send + Sync + 'static,
Output: Send + 'static,
T1: Clone + Send + Sync + 'static,
T2: Clone + Send + Sync + 'static,
T3: Clone + Send + Sync + 'static,
T4: Clone + Send + Sync + 'static,
T5: Clone + Send + Sync + 'static,
T6: Clone + Send + Sync + 'static,
T7: Clone + Send + Sync + 'static,
T8: Clone + Send + Sync + 'static,
T9: Clone + Send + Sync + 'static,
T10: Clone + Send + Sync + 'static,
impl<Func, Output, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Injectable<Output, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> for Asyncify<Func>where
Func: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) -> Output + Send + Sync + 'static,
Output: Send + 'static,
T1: Clone + Send + Sync + 'static,
T2: Clone + Send + Sync + 'static,
T3: Clone + Send + Sync + 'static,
T4: Clone + Send + Sync + 'static,
T5: Clone + Send + Sync + 'static,
T6: Clone + Send + Sync + 'static,
T7: Clone + Send + Sync + 'static,
T8: Clone + Send + Sync + 'static,
T9: Clone + Send + Sync + 'static,
T10: Clone + Send + Sync + 'static,
fn inject<'a>(&'a self, container: &'a DependencyMap) -> CompiledFn<'a, Output>
Source§fn input_types() -> BTreeSet<Type>
fn input_types() -> BTreeSet<Type>
Returns the set of types that this function depends on. Used only for
run-time “type checking”.
Source§impl<Func, Output, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Injectable<Output, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)> for Asyncify<Func>where
Func: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) -> Output + Send + Sync + 'static,
Output: Send + 'static,
T1: Clone + Send + Sync + 'static,
T2: Clone + Send + Sync + 'static,
T3: Clone + Send + Sync + 'static,
T4: Clone + Send + Sync + 'static,
T5: Clone + Send + Sync + 'static,
T6: Clone + Send + Sync + 'static,
T7: Clone + Send + Sync + 'static,
T8: Clone + Send + Sync + 'static,
T9: Clone + Send + Sync + 'static,
T10: Clone + Send + Sync + 'static,
T11: Clone + Send + Sync + 'static,
impl<Func, Output, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Injectable<Output, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)> for Asyncify<Func>where
Func: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) -> Output + Send + Sync + 'static,
Output: Send + 'static,
T1: Clone + Send + Sync + 'static,
T2: Clone + Send + Sync + 'static,
T3: Clone + Send + Sync + 'static,
T4: Clone + Send + Sync + 'static,
T5: Clone + Send + Sync + 'static,
T6: Clone + Send + Sync + 'static,
T7: Clone + Send + Sync + 'static,
T8: Clone + Send + Sync + 'static,
T9: Clone + Send + Sync + 'static,
T10: Clone + Send + Sync + 'static,
T11: Clone + Send + Sync + 'static,
fn inject<'a>(&'a self, container: &'a DependencyMap) -> CompiledFn<'a, Output>
Source§fn input_types() -> BTreeSet<Type>
fn input_types() -> BTreeSet<Type>
Returns the set of types that this function depends on. Used only for
run-time “type checking”.
Source§impl<Func, Output, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Injectable<Output, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)> for Asyncify<Func>where
Func: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) -> Output + Send + Sync + 'static,
Output: Send + 'static,
T1: Clone + Send + Sync + 'static,
T2: Clone + Send + Sync + 'static,
T3: Clone + Send + Sync + 'static,
T4: Clone + Send + Sync + 'static,
T5: Clone + Send + Sync + 'static,
T6: Clone + Send + Sync + 'static,
T7: Clone + Send + Sync + 'static,
T8: Clone + Send + Sync + 'static,
T9: Clone + Send + Sync + 'static,
T10: Clone + Send + Sync + 'static,
T11: Clone + Send + Sync + 'static,
T12: Clone + Send + Sync + 'static,
impl<Func, Output, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Injectable<Output, (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)> for Asyncify<Func>where
Func: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) -> Output + Send + Sync + 'static,
Output: Send + 'static,
T1: Clone + Send + Sync + 'static,
T2: Clone + Send + Sync + 'static,
T3: Clone + Send + Sync + 'static,
T4: Clone + Send + Sync + 'static,
T5: Clone + Send + Sync + 'static,
T6: Clone + Send + Sync + 'static,
T7: Clone + Send + Sync + 'static,
T8: Clone + Send + Sync + 'static,
T9: Clone + Send + Sync + 'static,
T10: Clone + Send + Sync + 'static,
T11: Clone + Send + Sync + 'static,
T12: Clone + Send + Sync + 'static,
fn inject<'a>(&'a self, container: &'a DependencyMap) -> CompiledFn<'a, Output>
Source§fn input_types() -> BTreeSet<Type>
fn input_types() -> BTreeSet<Type>
Returns the set of types that this function depends on. Used only for
run-time “type checking”.
Auto Trait Implementations§
impl<F> Freeze for Asyncify<F>where
F: Freeze,
impl<F> RefUnwindSafe for Asyncify<F>where
F: RefUnwindSafe,
impl<F> Send for Asyncify<F>where
F: Send,
impl<F> Sync for Asyncify<F>where
F: Sync,
impl<F> Unpin for Asyncify<F>where
F: Unpin,
impl<F> UnwindSafe for Asyncify<F>where
F: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more