InliningAddresses::inext_point
This commit is contained in:
parent
effc7f4527
commit
8ad50fa9b1
@ -40,8 +40,8 @@ impl Addresses {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait InliningAddresses: Inlining {
|
pub trait InliningAddresses<E>: Inlining {
|
||||||
fn inext_address<E>(
|
fn inext_address(
|
||||||
self,
|
self,
|
||||||
addresses: &mut Addresses,
|
addresses: &mut Addresses,
|
||||||
err: impl FnOnce(&[u8]) -> E,
|
err: impl FnOnce(&[u8]) -> E,
|
||||||
@ -54,9 +54,20 @@ pub trait InliningAddresses: Inlining {
|
|||||||
addresses.current += 1;
|
addresses.current += 1;
|
||||||
Ok((address, deserializer))
|
Ok((address, deserializer))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn inext_point<'a, 'b, Ctx: Context<'a>, A: Mentionable<'a, Ctx>>(
|
||||||
|
self,
|
||||||
|
addresses: &mut Addresses,
|
||||||
|
resolver: Rc<dyn Resolver<'a, Ctx>>,
|
||||||
|
factory: A::Fctr,
|
||||||
|
err: impl FnOnce(&[u8]) -> E,
|
||||||
|
) -> Result<(Point<'a, Ctx, A>, Self), E> {
|
||||||
|
let (point, deserializer) = self.inext_address(addresses, err)?;
|
||||||
|
Ok((Point::from_address(point, factory, resolver), deserializer))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<D: Inlining> InliningAddresses for D {}
|
impl<E, D: Inlining> InliningAddresses<E> for D {}
|
||||||
|
|
||||||
fn _parse_slice<'a, Ctx: Context<'a>, A: Mentionable<'a, Ctx>>(
|
fn _parse_slice<'a, Ctx: Context<'a>, A: Mentionable<'a, Ctx>>(
|
||||||
factory: &A::Fctr,
|
factory: &A::Fctr,
|
||||||
|
Loading…
Reference in New Issue
Block a user