Diffstat (limited to 'src/build.rs')
-rw-r--r--src/build.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/build.rs b/src/build.rs
index 372eac8..4dbf564 100644
--- a/src/build.rs
+++ b/src/build.rs
@@ -3,7 +3,7 @@ pub mod builders;
use crate::{
effect::{Effect, ErasedEffective},
- protocol::DynVisitor,
+ protocol::{AsVisitor, DynVisitor},
};
/// A buildable type.
@@ -35,7 +35,7 @@ pub trait BuilderTypes {
/// the builder with data from it's walk.
/// - Call [`Self::build()`] to finish building the value and get any errors
/// that happened during filling it with data.
-pub trait Builder<'ctx, E: Effect>: BuilderTypes + Sized + Send + Sync {
+pub trait Builder<'ctx, E: Effect>: AsVisitor<'ctx> + BuilderTypes + Sized + Send + Sync {
fn from_seed<'a>(seed: Self::Seed) -> ErasedEffective<'a, Self, E>
where
Self: 'a;
@@ -47,9 +47,4 @@ pub trait Builder<'ctx, E: Effect>: BuilderTypes + Sized + Send + Sync {
fn build<'a>(self) -> ErasedEffective<'a, Result<Self::Value, Self::Error>, E>
where
Self: 'a;
-
- /// Get the builder as a visitor that a walker can use.
- ///
- /// This is expected to just be `self`.
- fn as_visitor(&mut self) -> DynVisitor<'_, 'ctx>;
}