diff --git a/src/lib.rs b/src/lib.rs index 93eeff8..1fee685 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -97,8 +97,8 @@ impl Node { } } - pub fn pop(self) -> Inner { - self.inner + pub fn split(self) -> (Inner, Segment) { + (self.inner, self.segment) } pub fn field(self, field: F) -> Field @@ -122,6 +122,18 @@ impl Node { } } +impl Field { + pub fn split(self) -> (Inner, Segment) { + (self.inner, self.segment) + } +} + +impl Prefix { + pub fn pop(self) -> Inner { + self.inner + } +} + impl Field where Self: Construct,