loosen Origin
bounds
This commit is contained in:
parent
c6b3029798
commit
8ab5d21089
@ -3,13 +3,14 @@ use super::*;
|
||||
/// Represents a potentially resolvable [`Mentionable`].
|
||||
pub trait Origin<'a, Ctx: Context<'a>>: 'a {
|
||||
/// Type of the associated object.
|
||||
type Mtbl: MentionableBase<'a, Ctx> + MentionableTop<'a, Ctx>;
|
||||
type Mtbl: MentionableBase<'a, Ctx>;
|
||||
/// Clone the associated factory.
|
||||
fn factory(&self) -> OFctr<'a, Ctx, Self>;
|
||||
/// Try resolving the value.
|
||||
fn resolve(self: Rc<Self>) -> Resolution<'a, Ctx, Self::Mtbl>
|
||||
where
|
||||
OFctr<'a, Ctx, Self>: Factory<'a, Ctx>;
|
||||
OFctr<'a, Ctx, Self>: Factory<'a, Ctx>,
|
||||
Self::Mtbl: MentionableTop<'a, Ctx>;
|
||||
/// Try resolving the bytes. Should avoid parsing the value.
|
||||
fn resolve_bytes(self: Rc<Self>) -> HashResolution<'a, Ctx>;
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ pub trait MappableOrigin<'a, Ctx: Context<'a>>: Origin<'a, Ctx> {
|
||||
) -> Rc<dyn Origin<'a, Ctx, Mtbl = B>>
|
||||
where
|
||||
OFctr<'a, Ctx, Self>: Factory<'a, Ctx>,
|
||||
Self::Mtbl: MentionableTop<'a, Ctx>,
|
||||
{
|
||||
let origin_r = self.clone();
|
||||
let origin_rb = self.clone();
|
||||
|
Loading…
Reference in New Issue
Block a user