Diffstat (limited to 'src/protocol/visitor/recoverable.rs')
-rw-r--r--src/protocol/visitor/recoverable.rs23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/protocol/visitor/recoverable.rs b/src/protocol/visitor/recoverable.rs
index af3e494..4c9c604 100644
--- a/src/protocol/visitor/recoverable.rs
+++ b/src/protocol/visitor/recoverable.rs
@@ -1,5 +1,13 @@
use crate::{
- any::{TypeName}, effect::{Effect, Future}, higher_ranked_type, hkt::Marker, protocol::{walker::hint::{HintKnown, HintMeta}, Visitor}, Status
+ any::TypeName,
+ effect::{Effect, Future},
+ higher_ranked_type,
+ hkt::Marker,
+ protocol::{
+ walker::hint::{HintKnown, HintMeta},
+ Visitor,
+ },
+ Status,
};
use super::VisitResult;
@@ -16,12 +24,12 @@ pub struct RecoverableProto<E: Effect>(Marker<E>);
higher_ranked_type! {
impl TypeName {
impl['a, 'ctx, E] type T['a, 'ctx] for RecoverableProto<E> =
- dyn Recoverable<'ctx, E> + Send + 'a
+ dyn Recoverable<'ctx, E> + Send + Sync + 'a
where {
E: Effect
};
- impl['a, 'ctx, E] type HigherRanked['a, 'ctx] for dyn Recoverable<'ctx, E> + Send + 'a =
+ impl['a, 'ctx, E] type HigherRanked['a, 'ctx] for dyn Recoverable<'ctx, E> + Send + Sync + 'a =
RecoverableProto<E>
where {
E: Effect
@@ -33,21 +41,22 @@ pub trait RecoverableScope<'ctx, E: Effect> {
fn new_walk<'a>(&'a mut self, visitor: Visitor<'a, 'ctx>) -> Future<'a, Status, E>;
}
-pub type DynRecoverableScope<'a, 'ctx, E> = &'a mut (dyn RecoverableScope<'ctx, E> + Send + 'a);
+pub type DynRecoverableScope<'a, 'ctx, E> =
+ &'a mut (dyn RecoverableScope<'ctx, E> + Send + Sync + 'a);
pub struct RecoverableKnown;
higher_ranked_type! {
impl HintKnown {
- impl['a] type T['a] for RecoverableKnown =
+ impl['a, 'ctx] type T['a, 'ctx] for RecoverableKnown =
RecoverableKnown;
- impl['a] type HigherRanked['a] for RecoverableKnown =
+ impl['a, 'ctx] type HigherRanked['a, 'ctx] for RecoverableKnown =
RecoverableKnown;
}
}
-impl<'ctx, E: Effect> HintMeta<'ctx> for RecoverableProto<E> {
+impl<E: Effect> HintMeta for RecoverableProto<E> {
type Known = RecoverableKnown;
type Hint = ();