Diffstat (limited to 'src/build/builders/core/struct.rs')
-rw-r--r--src/build/builders/core/struct.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/build/builders/core/struct.rs b/src/build/builders/core/struct.rs
index 6bc1ef1..3675f1c 100644
--- a/src/build/builders/core/struct.rs
+++ b/src/build/builders/core/struct.rs
@@ -14,7 +14,7 @@ use crate::{
ValueProto, VisitResult,
},
walker::hint::hint_protocol,
- DynVisitor, DynWalker,
+ AsVisitor, DynVisitor, DynWalker,
},
tri, Builder, BuilderTypes, DynWalkerObjSafe, Flow,
};
@@ -218,8 +218,16 @@ where
Inner::Value(value) => Ok(value).ready(),
}
}
+}
- fn as_visitor(&mut self) -> DynVisitor<'_, 'ctx> {
+impl<'ctx, Info, Mode: 'ctx, E: Effect> AsVisitor<'ctx> for StructBuilder<'ctx, Info, Mode, E>
+where
+ Info: StructTypeInfo<'ctx, Mode, E>,
+{
+ fn as_visitor<'a>(&'a mut self) -> DynVisitor<'a, 'ctx>
+ where
+ 'ctx: 'a,
+ {
DynVisitor(self)
}
}