diff --git a/src/rcore/demoted.rs b/src/rcore/demoted.rs index dd2f941..630410c 100644 --- a/src/rcore/demoted.rs +++ b/src/rcore/demoted.rs @@ -21,3 +21,31 @@ impl<'a: 'c, 'c, Ctx: Context<'a>> Inlining for Demoted<'a, 'c, Ctx> { self.0.itell() } } + +impl<'a: 'c, 'c, Ctx: Context<'a>> InCtx<'a, Ctx> for Demoted<'a, 'c, Ctx> { + fn icnext_address(self, err: impl FnOnce(&[u8]) -> E) -> Result<(Address, Self), E> { + let (address, dectx) = self.0.icnext_address(err)?; + Ok((address, Self(dectx))) + } + + fn icnext_point<'b, A: Mentionable<'a, Ctx>, E>( + self, + factory: A::Fctr, + err: impl FnOnce(&[u8]) -> E, + ) -> Result<(Point<'a, Ctx, A>, Self), E> { + let (point, dectx) = self.0.icnext_point(factory, err)?; + Ok((point, Self(dectx))) + } + + fn iresolver(&self) -> Rc> { + self.0.iresolver() + } + + fn demote<'d>(self) -> Demoted<'a, 'd, Ctx> + where + 'a: 'd, + Self: 'd, + { + self.0.demote() + } +}