Demoted docs

This commit is contained in:
AF 2023-07-01 14:41:53 +00:00
parent f7549c5691
commit 3f0fc22b44
2 changed files with 2 additions and 0 deletions

View File

@ -1,5 +1,6 @@
use super::*; use super::*;
/// Demoted [`InCtx`], returned by [`InCtx::demote`]. Use when a concrete type required.
pub struct Demoted<'a: 'c, 'c, Ctx: Context<'a>>(pub(super) &'c mut dyn DeCtx<'a, Ctx>); pub struct Demoted<'a: 'c, 'c, Ctx: Context<'a>>(pub(super) &'c mut dyn DeCtx<'a, Ctx>);
impl<'a: 'c, 'c, Ctx: Context<'a>> Inlining for Demoted<'a, 'c, Ctx> { impl<'a: 'c, 'c, Ctx: Context<'a>> Inlining for Demoted<'a, 'c, Ctx> {

View File

@ -21,6 +21,7 @@ pub trait InCtx<'a, Ctx: Context<'a>>: Inlining {
/// Clone the reference to the current [Resolver]. /// Clone the reference to the current [Resolver].
fn iresolver(&self) -> Rc<dyn Resolver<'a, Ctx>>; fn iresolver(&self) -> Rc<dyn Resolver<'a, Ctx>>;
/// Return [Demoted] version of the context.
fn demote<'d>(self) -> Demoted<'a, 'd, Ctx> fn demote<'d>(self) -> Demoted<'a, 'd, Ctx>
where where
'a: 'd, 'a: 'd,