Diffstat (limited to 'src/effect/async/then.rs')
| -rw-r--r-- | src/effect/async/then.rs | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/effect/async/then.rs b/src/effect/async/then.rs index 96b2c8c..2ffc705 100644 --- a/src/effect/async/then.rs +++ b/src/effect/async/then.rs @@ -7,7 +7,7 @@ use core::{ use futures::Future; use pin_project::pin_project; -use crate::effect::{Effective, ErasedEffective}; +use crate::effect::{Effective, ErasedEffective, Ss}; use super::{map::Map, Async, BoxOrReady}; @@ -88,13 +88,13 @@ where } } -impl<'c, 'lt: 'c, Fut0: Send + Sync + 'lt, V0: Send + Sync + 'lt, F0: Send + Sync + 'c> - Effective<'c> for Then<'lt, Fut0, F0, V0> +impl<'c, 'lt: 'c, Fut0: Ss + 'lt, V0: Ss + 'lt, F0: Ss + 'c> Effective<'c> + for Then<'lt, Fut0, F0, V0> where F0: FnOnce(Fut0::Output) -> V0, V0: Effective<'lt>, Fut0: Future, - Fut0::Output: Send + Sync + 'lt, + Fut0::Output: Ss + 'lt, { fn into_erased<B>(self) -> ErasedEffective<'c, Self::Output, Self::Effect, B> { BoxOrReady::Boxed(Box::pin(self)) @@ -110,13 +110,13 @@ where self } - type Loop<'ctx: 'a, 'a, T: Send + Sync + 'a, F: Send + Sync + 'a> + type Loop<'ctx: 'a, 'a, T: Ss + 'a, F: Ss + 'a> = BoxOrReady<'a, (V0::Output, T)> where F: for<'b> FnMut(&'b mut Self::Output) -> ErasedEffective<'b, ControlFlow<T>, Self::Effect>, 'c: 'a; - fn r#loop<'ctx: 'a, 'a, T: Send + Sync + 'a, F: Send + Sync + 'a>(self, mut cb: F) -> Self::Loop<'ctx, 'a, T, F> + fn r#loop<'ctx: 'a, 'a, T: Ss + 'a, F: Ss + 'a>(self, mut cb: F) -> Self::Loop<'ctx, 'a, T, F> where F: for<'b> FnMut(&'b mut Self::Output) -> ErasedEffective<'b, ControlFlow<T>, Self::Effect>, 'c: 'a, @@ -132,13 +132,13 @@ where })) } - type Map<'a, T: Send + Sync + 'a, F: Send + Sync + 'a> + type Map<'a, T: Ss + 'a, F: Ss + 'a> = Map<Self, F> where F: FnOnce(Self::Output) -> T, 'c: 'a; - fn map<'a, T: Send + Sync + 'a, F: Send + Sync + 'a>(self, cb: F) -> Self::Map<'a, T, F> + fn map<'a, T: Ss + 'a, F: Ss + 'a>(self, cb: F) -> Self::Map<'a, T, F> where F: FnOnce(Self::Output) -> T, 'c: 'a, @@ -146,17 +146,14 @@ where Map::new(self, cb) } - type Then<'a, T: Send + Sync + 'a, V: Send + Sync + 'a, F: Send + Sync + 'a> + type Then<'a, T: Ss + 'a, V: Ss + 'a, F: Ss + 'a> = Then<'a, Self, F, V> where F: FnOnce(Self::Output) -> V, V: Effective<'a, Output = T, Effect = Self::Effect>, 'c: 'a; - fn then<'a, T: Send + Sync + 'a, V: Send + Sync + 'a, F: Send + Sync + 'a>( - self, - cb: F, - ) -> Self::Then<'a, T, V, F> + fn then<'a, T: Ss + 'a, V: Ss + 'a, F: Ss + 'a>(self, cb: F) -> Self::Then<'a, T, V, F> where F: FnOnce(Self::Output) -> V, V: Effective<'a, Output = T, Effect = Self::Effect>, @@ -165,13 +162,13 @@ where Then::new(self, cb) } - type AsCtx<'ctx: 'a, 'a, T: Send + Sync + 'a, F: Send + Sync + 'a> + type AsCtx<'ctx: 'a, 'a, T: Ss + 'a, F: Ss + 'a> = BoxOrReady<'a, (Self::Output, T)> where F: for<'b> FnOnce(&'b mut Self::Output) -> ErasedEffective<'b, T, Self::Effect>, 'c: 'a; - fn as_ctx<'ctx: 'a, 'a, T: Send + Sync + 'a, F: Send + Sync + 'a>(self, cb: F) -> Self::AsCtx<'ctx, 'a, T, F> + fn as_ctx<'ctx: 'a, 'a, T: Ss + 'a, F: Ss + 'a>(self, cb: F) -> Self::AsCtx<'ctx, 'a, T, F> where F: for<'b> FnOnce(&'b mut Self::Output) -> ErasedEffective<'b, T, Self::Effect>, 'c: 'a, |