24 lines
842 B
Rust
24 lines
842 B
Rust
use crate::rcore::*;
|
|
|
|
pub trait ExternalPoints<'a, Ctx: Context<'a>, T> {
|
|
fn ex_points_typed(mentionable: &T, points: &mut impl PointsVisitor<'a, Ctx>);
|
|
}
|
|
|
|
pub trait ExternalPointsProxy<'a, Ctx: Context<'a>, T>: FactoryProxy<'a, Ctx>
|
|
where
|
|
Self::F: Factory<'a, Ctx>,
|
|
{
|
|
fn exp_points_typed(mentionable: &T, points: &mut impl PointsVisitor<'a, Ctx>);
|
|
}
|
|
|
|
impl<'a, Ctx: Context<'a>, A: Mentionable<'a, Ctx>, T> ExternalPoints<'a, Ctx, T> for A
|
|
where
|
|
<Fctr<'a, Ctx, A> as WithParseMode>::WithMode:
|
|
ExternalPointsProxy<'a, Ctx, T, F = Fctr<'a, Ctx, A>>,
|
|
{
|
|
fn ex_points_typed(mentionable: &T, points: &mut impl PointsVisitor<'a, Ctx>) {
|
|
type Wm<'a, Ctx, A> = <Fctr<'a, Ctx, A> as WithParseMode>::WithMode;
|
|
<Wm<'a, Ctx, A> as ExternalPointsProxy<'a, Ctx, _>>::exp_points_typed(mentionable, points)
|
|
}
|
|
}
|