InCtx
for Demoted
This commit is contained in:
parent
f8a8620aff
commit
4bdac0336d
@ -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<E>(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<dyn Resolver<'a, Ctx>> {
|
||||
self.0.iresolver()
|
||||
}
|
||||
|
||||
fn demote<'d>(self) -> Demoted<'a, 'd, Ctx>
|
||||
where
|
||||
'a: 'd,
|
||||
Self: 'd,
|
||||
{
|
||||
self.0.demote()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user