From 3f0fc22b4468144d8f26ffe5b714f2b876027410 Mon Sep 17 00:00:00 2001 From: timofey Date: Sat, 1 Jul 2023 14:41:53 +0000 Subject: [PATCH] `Demoted` docs --- src/rcore/demoted.rs | 1 + src/rcore/inctx.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/rcore/demoted.rs b/src/rcore/demoted.rs index 630410c..93e2720 100644 --- a/src/rcore/demoted.rs +++ b/src/rcore/demoted.rs @@ -1,5 +1,6 @@ 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>); impl<'a: 'c, 'c, Ctx: Context<'a>> Inlining for Demoted<'a, 'c, Ctx> { diff --git a/src/rcore/inctx.rs b/src/rcore/inctx.rs index bbbfd80..73d7d6f 100644 --- a/src/rcore/inctx.rs +++ b/src/rcore/inctx.rs @@ -21,6 +21,7 @@ pub trait InCtx<'a, Ctx: Context<'a>>: Inlining { /// Clone the reference to the current [Resolver]. fn iresolver(&self) -> Rc>; + /// Return [Demoted] version of the context. fn demote<'d>(self) -> Demoted<'a, 'd, Ctx> where 'a: 'd,