Demoted
docs
This commit is contained in:
parent
f7549c5691
commit
3f0fc22b44
@ -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> {
|
||||||
|
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user